Your IP : 216.73.216.196


Current Path : /opt/alt/python27/lib/python2.7/site-packages/_pytest/
Upload File :
Current File : //opt/alt/python27/lib/python2.7/site-packages/_pytest/pastebin.pyo

�
�mYc@`s�dZddlmZmZmZddlZddlZddlZd�Zej	de
�d��Zd�Zd�Z
d	�ZdS(
sC submit failure or test session information to a pastebin service. i(tabsolute_importtdivisiontprint_functionNcC`sJ|jd�}|jdddddddd	dd
ddgd
d�dS(Nsterminal reportings
--pastebintmetavartmodetactiontstoretdesttpastebintdefaulttchoicestfailedtallthelps4send failed|all info to bpaste.net pastebin service.(tgetgroupt
_addoptiontNone(tparsertgroup((sA/opt/alt/python27/lib/python2.7/site-packages/_pytest/pastebin.pytpytest_addoption	s
ttrylastc`s�ddl��jjdkr��jjd�}|dk	r�tjd��_|j	j
����fd�}||j	_
q�ndS(NiRtterminalreportersw+bc`sE�||��jj|�r1|jd�}n�jj|�dS(Nsutf-8(tbuiltint_istexttencodet
_pastebinfiletwrite(tstkwargs(tconfigtoldwritetpy(sA/opt/alt/python27/lib/python2.7/site-packages/_pytest/pastebin.pyt	tee_writes
(RtoptionRt
pluginmanagert	getpluginRttempfilet
TemporaryFileRt_twR(RttrR ((RRRsA/opt/alt/python27/lib/python2.7/site-packages/_pytest/pastebin.pytpytest_configurescC`s�t|d�r�|jjd�|jj�}|jj�|`|jjd�}|jjd=|j	dd�t
|�}|jd|�ndS(NRiRRt=s$Sending information to Paste Servicespastebin session-log: %s
(thasattrRtseektreadtcloseR"R#R&t__dict__t	write_septcreate_new_pastet
write_line(Rt
sessionlogR'tpastebinurl((sA/opt/alt/python27/lib/python2.7/site-packages/_pytest/pastebin.pytpytest_unconfigure's

cC`s�ddl}tjdkr4ddlm}m}n ddlm}ddlm}i|d6tjddkrwdnd	d
6dd6}d
}||d||�jd��j	�}|j
d|jd��}|r�d||jd�fSd|SdS(s�
    Creates a new paste using bpaste.net service.

    :contents: paste contents as utf-8 encoded bytes
    :returns: url to the pasted contents
    iNi(turlopent	urlencode(R5(R6tcodetpython3tpythontlexert1weektexpiryshttps://bpaste.nettdatatasciishref="/raw/(\w+)"sutf-8s
%s/show/%sisbad response: (ii(
tretsystversion_infoturllibR5R6turllib.requestturllib.parseRR,tsearchtdecodeR(tcontentsR?R5R6tparamsturltresponsetm((sA/opt/alt/python27/lib/python2.7/site-packages/_pytest/pastebin.pyR07s 
'cC`sddl}|jjjdkr%dS|}d|jkr|jdd�x�|jjd�D]�}y|jjj	dj
}Wn tk
r�|j|�}nX|jj
|jdt�}|j|�|jj�}t|�}|jd||f�q]WndS(NiRR)s$Sending information to Paste Servicei����tstringios	%s --> %s(t_pytest.configRR!RtstatsR/tgettlongreprt
reprtracebacktreprentriestreprfileloctAttributeErrort_getfailureheadlinetcreate_terminal_writertTruet
toterminalRLtgetvalueR0R1(Rt_pytestR'treptmsgttwRR3((sA/opt/alt/python27/lib/python2.7/site-packages/_pytest/pastebin.pytpytest_terminal_summarySs 

(t__doc__t
__future__RRRtpytestR@R$RthookimplRWR(R4R0R^(((sA/opt/alt/python27/lib/python2.7/site-packages/_pytest/pastebin.pyt<module>s