GhostManSec
Server: Apache
System: Linux s323.xrea.com 5.15.0-164-generic #174-Ubuntu SMP Fri Nov 14 20:25:16 UTC 2025 x86_64
User: moonarc (17751)
PHP: 8.1.34
Disabled: NONE
Upload Files
File: //usr/lib/python2.7/site-packages/_pytest/runner.pyc
�
��abc@`s�dZddlmZmZmZddlZddlZddlZddlmZddl	Z	ddl
mZmZddl
mZmZmZd�Zd�Zd	�Zd
�Zd�Zedd�Zd
�Zd�Zd�Zd�Zd�Zd�Zed�Zd�Z d�Z!de"fd��YZ#d�Z$de"fd��YZ%d�Z&de%fd��YZ'de%fd��YZ(d �Z)d!e%fd"��YZ*d#efd$��YZ+d%e"fd&��YZ,d'�Z-dS((s4 basic collect and runtest protocol implementations i(tabsolute_importtdivisiontprint_functionN(ttime(tTerminalReprt
ExceptionInfo(tskiptSkippedtTEST_OUTCOMEcC`sJ|jdddd�}|jddddtd	dd
ddd
�fdS(Nsterminal reportingt	reportingtaftertgenerals--durationstactiontstorettypetdefaulttmetavartNthelps2show N slowest setup/test durations (N=0 for all).(tgetgroupt	addoptiontinttNone(tparsertgroup((s2/usr/lib/python2.7/site-packages/_pytest/runner.pytpytest_addoptionscC`s|jjj}|dkrdS|}g}xG|jj�D]6}x-|D]%}t|d�rH|j|�qHqHWq;W|sdS|jdd��|j	�|s�|j
dd�n|j
dd|�|| }xC|D];}|jjdd�}|j
d	|j|j|f�q�WdS(
NtdurationtkeycS`s|jS(N(R(tx((s2/usr/lib/python2.7/site-packages/_pytest/runner.pyt<lambda>$tt=sslowest test durationssslowest %s test durationss::()::s::s%02.2fs %-8s %s(tconfigtoptiont	durationsRtstatstvaluesthasattrtappendtsorttreverset	write_septnodeidtreplacet
write_lineRtwhen(tterminalreporterR"ttrtdlisttreplisttrepR*((s2/usr/lib/python2.7/site-packages/_pytest/runner.pytpytest_terminal_summarys*



	cC`st�|_dS(N(t
SetupStatet_setupstate(tsession((s2/usr/lib/python2.7/site-packages/_pytest/runner.pytpytest_sessionstart2scC`s|jj�dS(N(R5tteardown_all(R6((s2/usr/lib/python2.7/site-packages/_pytest/runner.pytpytest_sessionfinish6scC`sR|jjd|jd|j�t|d|�|jjd|jd|j�tS(NR*tlocationtnextitem(tihooktpytest_runtest_logstartR*R:truntestprotocoltpytest_runtest_logfinishtTrue(titemR;((s2/usr/lib/python2.7/site-packages/_pytest/runner.pytpytest_runtest_protocol:scC`s�t|d�}|r,|jr,|j�nt|d|�}|g}|jr�|jjjrlt|�n|jjj	s�|j
t|d|��q�n|j
t|d|d|��|r�t|_d|_
n|S(Nt_requesttsetuptcalltteardownR;(R%RCt_initrequesttcall_and_reporttpassedR R!t	setupshowtshow_test_itemt	setuponlyR&tFalseRtfuncargs(RAtlogR;t
hasrequestR2treports((s2/usr/lib/python2.7/site-packages/_pytest/runner.pyR>Es 
		

	cC`sz|jj�}|j�|jd�|j|j�t|jjj��}|rv|jdj	dj
|���ndS(sAShow test function, parameters and the fixtures of the test item.t is (fixtures used: {0})s, Ns        (R tget_terminal_writertlinetwritet_nodeidtsortedt_fixtureinfotname2fixturedefstkeystformattjoin(RAttwt
used_fixtures((s2/usr/lib/python2.7/site-packages/_pytest/runner.pyRKZs

cC`s$t|d�|jjj|�dS(NRD(t_update_current_test_varR6R5tprepare(RA((s2/usr/lib/python2.7/site-packages/_pytest/runner.pytpytest_runtest_setupes
cC`srt|d�y|j�WnPtk
rmtj�\}}}|j}|t_|t_|t_~�nXdS(NRE(	R_truntestt	Exceptiontsystexc_infottb_nextt	last_typet
last_valuetlast_traceback(RARtvaluettb((s2/usr/lib/python2.7/site-packages/_pytest/runner.pytpytest_runtest_calljs

				cC`s4t|d�|jjj||�t|d�dS(NRF(R_R6R5tteardown_exactR(RAR;((s2/usr/lib/python2.7/site-packages/_pytest/runner.pytpytest_runtest_teardownys
cC`sWd}|rCdj|j|�}|jdd�}|tj|<ntjj|�dS(s�
    Update PYTEST_CURRENT_TEST to reflect the current item and stage.

    If ``when`` is None, delete PYTEST_CURRENT_TEST from the environment.
    tPYTEST_CURRENT_TESTs	{0} ({1})ss(null)N(R[R*R+tostenvirontpop(RAR-tvar_nameRj((s2/usr/lib/python2.7/site-packages/_pytest/runner.pyR_scC`s4|jd
kr0|jrdS|jr)dSd
SndS(NRDRFterrortEtERRORtskippedtstSKIPPEDR(RDRF(RtRuRv(RwRxRy(RRR(R-tfailedRw(treport((s2/usr/lib/python2.7/site-packages/_pytest/runner.pytpytest_report_teststatus�s		cK`s~t|||�}|j}|jd|d|�}|rL|jd|�nt||�rz|jd|d|d|�n|S(NRARER{tnode(tcall_runtest_hookR<tpytest_runtest_makereporttpytest_runtest_logreporttcheck_interactive_exceptiontpytest_exception_interact(RAR-ROtkwdsREthookR{((s2/usr/lib/python2.7/site-packages/_pytest/runner.pyRH�s	cC`sA|jo@t|d�p?|jjtj�p?|jjtj�S(Ntwasxfail(texcinfoR%t
errisinstanceRRctbdbtBdbQuit(RER{((s2/usr/lib/python2.7/site-packages/_pytest/runner.pyR��s	c`s;d|}t�j|��t���fd�d|�S(Ntpytest_runtest_c`s�d���S(NRA(((R<RAR�(s2/usr/lib/python2.7/site-packages/_pytest/runner.pyR�RR-(tgetattrR<tCallInfo(RAR-R�thookname((R<RAR�s2/usr/lib/python2.7/site-packages/_pytest/runner.pyR~�s
R�cB`s&eZdZdZd�Zd�ZRS(s. Result/Exception info a function invocation. cC`sj||_t�|_y|�|_Wn2tk
rGt�|_�nt�|_nXt�|_dS(N(R-RtstarttresulttKeyboardInterrupttstopRR�(tselftfuncR-((s2/usr/lib/python2.7/site-packages/_pytest/runner.pyt__init__�s	
cC`sC|jr"dt|jj�}nd|jf}d|j|fS(Ns
exception: %ss
result: %rs<CallInfo when=%r %s>(R�tstrRjR�R-(R�tstatus((s2/usr/lib/python2.7/site-packages/_pytest/runner.pyt__repr__�s	N(t__name__t
__module__t__doc__RR�R�R�(((s2/usr/lib/python2.7/site-packages/_pytest/runner.pyR��s	cC`shy|jSWnVtk
rc|j}d|dd }d|d|d||df|_}|SXdS(Ns%s.%s.%stversion_infois[%s] %s -- Python %s %stidtsysplatformt
executable(t_slaveinfocachetAttributeErrort	slaveinfo(R}tdtverRx((s2/usr/lib/python2.7/site-packages/_pytest/runner.pytgetslaveinfoline�s
	&t
BaseReportcB`s�eZd�Zd�Zd�Zed��Zed��Zed��Zed��Z	ed��Z
ed��Zed	��ZRS(
cK`s|jj|�dS(N(t__dict__tupdate(R�tkw((s2/usr/lib/python2.7/site-packages/_pytest/runner.pyR��scC`s�t|d�r(|jt|j��n|j}|dkrAdSt|d�r`|j|�n2y|j|�Wntk
r�|jd�nXdS(NR}t
toterminals<unprintable longrepr>(R%RTR�R}tlongreprRR�tUnicodeEncodeError(R�toutR�((s2/usr/lib/python2.7/site-packages/_pytest/runner.pyR��s	
cc`s;x4|jD])\}}|j|�r
||fVq
q
WdS(N(tsectionst
startswith(R�tprefixtnametcontent((s2/usr/lib/python2.7/site-packages/_pytest/runner.pytget_sections�scC`sDtjjdt�}t|_|j|�|jj�}|j	�S(s�
        Read-only property that returns the full string representation
        of ``longrepr``.

        .. versionadded:: 3.0
        tstringio(
tpytiotTerminalWriterR@RMt	hasmarkupR�R�tgetvaluetstrip(R�R]texc((s2/usr/lib/python2.7/site-packages/_pytest/runner.pytlongreprtext�s
	
cC`s djd�|jd�D��S(saReturn captured text from stdout, if capturing is enabled

        .. versionadded:: 3.0
        Rcs`s|]\}}|VqdS(N((t.0R�R�((s2/usr/lib/python2.7/site-packages/_pytest/runner.pys	<genexpr>	ssCaptured stdout(R\R�(R�((s2/usr/lib/python2.7/site-packages/_pytest/runner.pyt	capstdoutscC`s djd�|jd�D��S(saReturn captured text from stderr, if capturing is enabled

        .. versionadded:: 3.0
        Rcs`s|]\}}|VqdS(N((R�R�R�((s2/usr/lib/python2.7/site-packages/_pytest/runner.pys	<genexpr>ssCaptured stderr(R\R�(R�((s2/usr/lib/python2.7/site-packages/_pytest/runner.pyt	capstderrscC`s
|jdkS(NRI(toutcome(R((s2/usr/lib/python2.7/site-packages/_pytest/runner.pyRRcC`s
|jdkS(NRz(R�(R((s2/usr/lib/python2.7/site-packages/_pytest/runner.pyRRcC`s
|jdkS(NRw(R�(R((s2/usr/lib/python2.7/site-packages/_pytest/runner.pyRRcC`s|jjd�dS(Ns::i(R*tsplit(R�((s2/usr/lib/python2.7/site-packages/_pytest/runner.pytfspaths(
R�R�R�R�R�tpropertyR�R�R�RIRzRwR�(((s2/usr/lib/python2.7/site-packages/_pytest/runner.pyR��s			c	C`so|j}|j|j}tg|jD]}|df^q&�}|j}g}|jshd}d}	n�t|t�s�d}|}	n�|j	t
j�r�d}|j�}
t
|
j�|
j|
jf}	nEd}|jdkr�|j|�}	n|j|d|jjj�}	x7|jD],\}}}
|jd||f|
f�qWt|j|j|||	|||�S(NiRIRzRwREtstylesCaptured %s %s(R-R�R�tdicttkeywordsR�Rt
isinstanceRR�RRct
_getreprcrashR�tpathtlinenotmessagetrepr_failuret_repr_failure_pyR R!ttbstylet_report_sectionsR&t
TestReportR*R:(RARER-RRR�R�R�R�R�trtrwhenRR�((s2/usr/lib/python2.7/site-packages/_pytest/runner.pyRs2	(				!!R�cB`s&eZdZddd�Zd�ZRS(sY Basic test report object (also used for setup and teardown calls if
    they fail).
    ic	
K`sb||_||_||_||_||_||_t|�|_||_|j	j
|	�dS(N(R*R:R�R�R�R-tlistR�RR�R�(
R�R*R:R�R�R�R-R�Rtextra((s2/usr/lib/python2.7/site-packages/_pytest/runner.pyR�@s							cC`sd|j|j|jfS(Ns"<TestReport %r when=%r outcome=%r>(R*R-R�(R�((s2/usr/lib/python2.7/site-packages/_pytest/runner.pyR�bs((R�R�R�R�R�(((s2/usr/lib/python2.7/site-packages/_pytest/runner.pyR�;s!tTeardownErrorReportcB`seZdZdZd�ZRS(RzRFcK`s&||_g|_|jj|�dS(N(R�R�R�R�(R�R�R�((s2/usr/lib/python2.7/site-packages/_pytest/runner.pyR�ks		(R�R�R�R-R�(((s2/usr/lib/python2.7/site-packages/_pytest/runner.pyR�gsc	`st�fd�d�}d}|js0d}n�ddlm}tf|j�}|jj|�r�d}�j|jd�j	}t
|j�|j|j
f}n<d}�j|j�}t|d	�s�t|�}n|}t�j||t|d
d��}||_|S(Nc`st�j��S(N(R�tcollect((t	collector(s2/usr/lib/python2.7/site-packages/_pytest/runner.pyRsRR�RIi(tnoseRwRTRzR�R�(R�RR�t_pytestR�Rtget_skip_exceptionsR�R�t	reprcrashR�R�R�R�R�R%tCollectErrorReprt
CollectReportR*R�RE(	R�RER�R�R�tskip_exceptionsR�t	errorinfoR2((R�s2/usr/lib/python2.7/site-packages/_pytest/runner.pytpytest_make_collect_reportqs*			!	R�cB`s,eZdd�Zed��Zd�ZRS(cK`sM||_||_||_|p$g|_t|�|_|jj|�dS(N(R*R�R�R�R�R�R�R�(R�R*R�R�R�R�R�((s2/usr/lib/python2.7/site-packages/_pytest/runner.pyR��s			cC`s|jd|jfS(N(R�R(R�((s2/usr/lib/python2.7/site-packages/_pytest/runner.pyR:�scC`s d|jt|j�|jfS(Ns*<CollectReport %r lenresult=%s outcome=%r>(R*tlenR�R�(R�((s2/usr/lib/python2.7/site-packages/_pytest/runner.pyR��s((R�R�R�R�R:R�(((s2/usr/lib/python2.7/site-packages/_pytest/runner.pyR��sR�cB`seZd�Zd�ZRS(cC`s
||_dS(N(R�(R�tmsg((s2/usr/lib/python2.7/site-packages/_pytest/runner.pyR��scC`s|j|jdt�dS(Ntred(RTR�R@(R�R�((s2/usr/lib/python2.7/site-packages/_pytest/runner.pyR��s(R�R�R�R�(((s2/usr/lib/python2.7/site-packages/_pytest/runner.pyR��s	R4cB`s_eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�ZRS(
sD shared state for setting up/tearing down test items or collectors. cC`sg|_i|_dS(N(tstackt_finalizers(R�((s2/usr/lib/python2.7/site-packages/_pytest/runner.pyR��s	cC`sN|rt|t�st�t|�s.t�|jj|g�j|�dS(s� attach a finalizer to the given colitem.
        if colitem is None, this will add a finalizer that
        is called at the end of teardown_all().
        N(R�ttupletAssertionErrortcallableR�t
setdefaultR&(R�t	finalizertcolitem((s2/usr/lib/python2.7/site-packages/_pytest/runner.pytaddfinalizer�scC`s |jj�}|j|�dS(N(R�Rrt_teardown_with_finalization(R�R�((s2/usr/lib/python2.7/site-packages/_pytest/runner.pyt_pop_and_teardown�scC`s�|jj|d�}d}xP|rm|j�}y|�Wqtk
ri|dkrjtj�}qjqXqW|r�tjj|�ndS(N(	R�RrRRRdReR�tbuiltint_reraise(R�R�t
finalizersR�tfin((s2/usr/lib/python2.7/site-packages/_pytest/runner.pyt_callfinalizers�s	
cC`sq|j|�t|d�r)|j�nxA|jD]6}|dks3||jks3t|t�s3t�q3WdS(NRF(	R�R%RFR�RR�R�R�R�(R�R�((s2/usr/lib/python2.7/site-packages/_pytest/runner.pyR��s

cC`sUx|jr|j�qWx$t|j�D]}|j|�q*W|jsQt�dS(N(R�R�R�R�R�R�(R�R((s2/usr/lib/python2.7/site-packages/_pytest/runner.pyR8�s
cC`s)|r|j�pg}|j|�dS(N(t	listchaint_teardown_towards(R�RAR;tneeded_collectors((s2/usr/lib/python2.7/site-packages/_pytest/runner.pyRm�scC`s>x7|jr9|j|t|j� kr,Pn|j�qWdS(N(R�R�R�(R�R�((s2/usr/lib/python2.7/site-packages/_pytest/runner.pyR��scC`s�|j�}|j|�x6|jD]+}t|d�r#tjj|j�q#q#Wx_|t|j�D]J}|jj	|�y|j
�Wqftk
r�tj
�|_�qfXqfWdS(sn setup objects along the collector chain to the test-method
            and teardown previously setup objects.t_prepare_excN(R�R�R�R%R�R�R�R�R�R&RDRRdRe(R�R�R�tcol((s2/usr/lib/python2.7/site-packages/_pytest/runner.pyR`�s

(R�R�R�R�R�R�R�R�R8RmR�R`(((s2/usr/lib/python2.7/site-packages/_pytest/runner.pyR4�s		
						cC`sx|j}|jd|�|jd|�}|jjdd�}|rtt||�rt|jd|d|d|�n|S(NR�RER}R{(R<tpytest_collectstartR�R�RrRR�R�(R�R<R2RE((s2/usr/lib/python2.7/site-packages/_pytest/runner.pytcollect_one_node�s	(.R�t
__future__RRRR�RpRdRR�t_pytest._code.codeRRt_pytest.outcomesRRRRR3R7R9RBR@RR>RKRaRlRnR_R|RHR�R~tobjectR�R�R�RR�R�R�R�R�R4R�(((s2/usr/lib/python2.7/site-packages/_pytest/runner.pyt<module>sD														A	,
	P