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/skipping.pyc
�
��abc@`shdZddlmZmZmZddlZddlZddlZddlZddl	m
Z
ddlmZm
Z
ddlmZmZmZmZd�Zd�Zd	efd
��YZe
de�d��Ze
d
e�d��Zd�Zd�Ze
d
e�d��Zd�Zd�Zd�Zd�Z d�Z!d�Z"d�Z#d�Z$dS(s/ support for skip/xfail functions and markers. i(tabsolute_importtdivisiontprint_functionN(thookimpl(tMarkInfot
MarkDecorator(tfailtskiptxfailtTEST_OUTCOMEc
C`sT|jd�}|jddddddtdd	�|jd
ddtdd
�dS(Ntgenerals
--runxfailtactiont
store_truetdesttrunxfailtdefaultthelps'run tests even if they are marked xfailtxfail_stricts\default for the strict parameter of xfail markers when not given explicitly (default: False)ttypetbool(tgetgroupt	addoptiontFalsetaddini(tparsertgroup((s4/usr/lib/python2.7/site-packages/_pytest/skipping.pytpytest_addoptionsc`s�|jjreddl��j�|jj��fd��d�}tj|_t�d|�n|jdd�|jdd�|jdd�dS(	Nic`st�d��S(NR(tsetattr((toldtpytest(s4/usr/lib/python2.7/site-packages/_pytest/skipping.pyt<lambda> tc_`sdS(N((targstkwargs((s4/usr/lib/python2.7/site-packages/_pytest/skipping.pytnop"sRtmarkerss�skip(reason=None): skip the given test function with an optional reason. Example: skip(reason="no way of currently testing this") skips the test.sskipif(condition): skip the given test function if eval(condition) results in a True value.  Evaluation happens within the module global context. Example: skipif('sys.platform == "win32"') skips the test if we are on the win32 platform. see http://pytest.org/latest/skipping.htmls�xfail(condition, reason=None, run=True, raises=None, strict=False): mark the test function as an expected failure if eval(condition) has a True value. Optionally specify a reason for better reporting and run=False if you don't even want to execute the test function. If only specific exception(s) are expected, you can list them in raises, and if the test fails in other ways, it will be reported as a true failure. See http://pytest.org/latest/skipping.html(	toptionRRRt_cleanuptappendt	ExceptionRtaddinivalue_line(tconfigR"((RRs4/usr/lib/python2.7/site-packages/_pytest/skipping.pytpytest_configures					t
MarkEvaluatorcB`skeZd�Zd�ZeZd�Zd�Zd�Zd�Zd�Z	d�Z
d
d�Zd	�Z
RS(cC`s(||_d|_d|_||_dS(N(titemtNonet_markst_markt
_mark_name(tselfR,tname((s4/usr/lib/python2.7/site-packages/_pytest/skipping.pyt__init__@s			cC`s|j�|_t|j�S(N(t
_get_marksR.R(R1((s4/usr/lib/python2.7/site-packages/_pytest/skipping.pyt__bool__FscC`st|d�S(Ntexc(thasattr(R1((s4/usr/lib/python2.7/site-packages/_pytest/skipping.pytwasvalidKscC`sb|jjj|j�}t|t�r1|jgSt|t�rZg|D]}|j^qGSgSdS(N(	R,tkeywordstgetR0t
isinstanceRtmarkRtcombined(R1tkeywordtx((s4/usr/lib/python2.7/site-packages/_pytest/skipping.pyR4Ns
cC`s'|jd�}|sdSt||�S(Ntraises(R:R;(R1R6R@((s4/usr/lib/python2.7/site-packages/_pytest/skipping.pytinvalidraiseXscC`s�y|j�SWn�tk
r�tj�|_t|jdt�rrd|jdjddg}|jd�nt	j
|jd �}td|j|j
dj|�fd	t�nXdS(
Nit it^sSyntaxError: invalid syntaxis(Error evaluating %r expression
    %s
%ss
tpytrace(t_istrueR	tsystexc_infoR6R;tSyntaxErrortoffsetR&t	tracebacktformat_exception_onlyRR0texprtjoinR(R1tmsg((s4/usr/lib/python2.7/site-packages/_pytest/skipping.pytistrue^s
cC`sPitd6td6|jjd6}t|jd�rL|j|jjj�n|S(NtosRFR)tobj(RPRFR,R)R7tupdateRQt__globals__(R1td((s4/usr/lib/python2.7/site-packages/_pytest/skipping.pyt_getglobalsns!cC`slt|d�r|jS|j�|_|jrht|_x.|jD] }||_d|jkrr|jdf}n	|j}x�|D]�}||_t	|t
j�r�|j�}t
|jj||�}n.d|jkr�d}t|�nt|�}|r�t|_|jjdd�|_||_|jSq�W|sAt|_|jjdd�|_|jSqAWntS(Ntresultt	conditiontreasonsDyou need to specify reason=STRING when using booleans as conditions.(R7RVR4R.RR/R!R RLR;tsixtstring_typesRUtcached_evalR,R)RRtTrueR:R-RX(R1R<R RLRTRVRN((s4/usr/lib/python2.7/site-packages/_pytest/skipping.pyREts:				
	
			cC`s)|jdkr|S|jjj||�S(N(R/R-R!R:(R1tattrR((s4/usr/lib/python2.7/site-packages/_pytest/skipping.pyR:�scC`sUt|dd�p!|jdd�}|sQt|d�s=dSdt|j�Sn|S(NRXRLRscondition: (tgetattrR-R:R7tstrRL(R1texpl((s4/usr/lib/python2.7/site-packages/_pytest/skipping.pytgetexplanation�s$N(t__name__t
__module__R3R5t__nonzero__R8R4RARORURER-R:Ra(((s4/usr/lib/python2.7/site-packages/_pytest/skipping.pyR+?s				
				&ttryfirstcC`st|_|jjd�}t|ttf�rjt|d�}|j�rjt	|_t
|j��qjn|jjd�}t|ttf�r�t	|_d|jkr�t
|jd�q�|j
r�t
|j
d�q�t
d�nt|d�|_t|�dS(NtskipifRRXisunconditional skipR(Rt_skipped_by_markR9R:R;RRR+ROR\RRaR!R t
_evalxfailtcheck_xfail_no_run(R,tskipif_infoteval_skipift	skip_info((s4/usr/lib/python2.7/site-packages/_pytest/skipping.pytpytest_runtest_setup�s"				
thookwrappercc`s7t|�dV}|jdk}|r3t|�ndS(N(RitexcinfoR-tcheck_strict_xfail(t
pyfuncitemtoutcometpassed((s4/usr/lib/python2.7/site-packages/_pytest/skipping.pytpytest_pyfunc_call�s

cC`sW|jjjsS|j}|j�rS|jdt�sPtd|j��qPqSndS(scheck xfail(run=False)truns	[NOTRUN] N(	R)R$RRhROR:R\RRa(R,t	evalxfail((s4/usr/lib/python2.7/site-packages/_pytest/skipping.pyRi�s
	cC`so|j}|j�rk|jjd�}|jd|�}|rk|`|j�}td|dt�qkndS(s3check xfail(strict=True) for the given PASSING testRtstricts[XPASS(strict)] RDN(RhROR)tgetiniR:RaRR(RqRvtstrict_defaulttis_strict_xfailtexplanation((s4/usr/lib/python2.7/site-packages/_pytest/skipping.pyRp�s	cc`sRdV}|j�}t|dd�}t|d�r�|jdkr�ddlm}|jrtdj|j�|_	n	d|_	|�r�d|_
qNd	|_
|j	|_n�|jj
jr�n�|jr�|jjtj�r�d
|jjj|_d|_
nR|r�|jr�|j�r�|j�r�|jri|j|jj�rNd|_
q�d|_
|j�|_qN|jdkrN|jjd�}|jd
|�}|j�}|r�d|_
dj|�|_	q�d	|_
||_qNnjt|dt�rN|jrNt|j	�tkrN|j	\}	}
}|jd \}	}
|	|
|f|_	ndS(NRht_unexpectedsuccesstcalli(t)_is_unittest_unexpected_success_a_failuresUnexpected success: {0}sUnexpected successtfailedRssreason: tskippedRRws[XPASS(strict)] {0}Rgi( t
get_resultR^R-R7twhent_pytest.compatR~R|tformattlongreprRrtwasxfailR)R$RRot
errisinstanceRR'tvalueRNR�R8RORARaRxR:RRttupletlocation(R,R}RrtrepRvR~RyRzR{tfilenametlineRX((s4/usr/lib/python2.7/site-packages/_pytest/skipping.pytpytest_runtest_makereport�sJ								0cC`sFt|d�rB|jrd	S|jrBddditd6ffSndS(
NR�txfailedR?RtxpassedtXtXPASStyellow(R�R?R(R7R�RsR\(treport((s4/usr/lib/python2.7/site-packages/_pytest/skipping.pytpytest_report_teststatuss
		cC`s(|}|jsdSg}x�|jD]�}|dkrEt||�q#|dkrat||�q#|dkr�t||dd�q#|dkr�t||�q#|dkr�t||dd	�q#|d
kr#t||dd�q#q#W|r$|jjd
d�x!|D]}|jj|�qWndS(NR?R�tfFRsFAIL %stsStEterrorsERROR %stpRss	PASSED %st=sshort test summary info(treportcharstshow_xfailedtshow_xpassedtshow_simpletshow_skippedt_twtsepR�(tterminalreporterttrtlinestcharR�((s4/usr/lib/python2.7/site-packages/_pytest/skipping.pytpytest_terminal_summarys*	
cC`sY|jj|�}|rUx:|D]/}|jj|j�}|j||f�qWndS(N(tstatsR:R)tcwd_relative_nodeidtnodeidR&(R�R�tstatR�RR�tpos((s4/usr/lib/python2.7/site-packages/_pytest/skipping.pyR�<s

cC`s�|jjd�}|r~xc|D]X}|jj|j�}|j}|jd|f�|r|jdt|��qqWndS(NR�sXFAIL %ss  (R�R:R)R�R�R�R&R_(R�R�R�R�R�RX((s4/usr/lib/python2.7/site-packages/_pytest/skipping.pyR�Ds
	cC`se|jjd�}|raxF|D];}|jj|j�}|j}|jd||f�qWndS(NR�sXPASS %s %s(R�R:R)R�R�R�R&(R�R�R�R�R�RX((s4/usr/lib/python2.7/site-packages/_pytest/skipping.pyR�Os
	cC`s�t|d�si|_ny|j|SWnPtk
r|ddl}|jj|dd�}t||�|j|<}|SXdS(Nt
_evalcacheitmodeteval(R7R�tKeyErrort
_pytest._codet_codetcompileR�(R)RLRTt_pytesttexprcodeR?((s4/usr/lib/python2.7/site-packages/_pytest/skipping.pyR[Xs
cC`si}x�|D]�}|j}t|�dks@t||f��t|di�}t|dd�}|dkr�d|kr�d|kr�|dd|df}n|j|g�j|�q
Wg}x4|j�D]&\}}|jt|�f|�q�W|S(	NiR9R�tsetupRt
pytestmarkii(R�tlentAssertionErrorR^R-t
setdefaultR&titems(R�RTteventtkeyR9R�tvaluestevents((s4/usr/lib/python2.7/site-packages/_pytest/skipping.pytfolded_skipsds
	$$c	C`s�|}|jjdg�}|r�t|�}|r�x�|D]x\}}}}|jd�rh|d}n|dk	r�|jd|||d|f�q:|jd|||f�q:Wq�ndS(NR�s	Skipped: i	sSKIP [%d] %s:%d: %sisSKIP [%d] %s: %s(R�R:R�t
startswithR-R&(	R�R�R�R�tfskipstnumtfspathtlinenoRX((s4/usr/lib/python2.7/site-packages/_pytest/skipping.pyR�ws
(%t__doc__t
__future__RRRRPRYRFRJt_pytest.configRt_pytest.markRRt_pytest.outcomesRRRR	RR*tobjectR+R\RmRtRiRpR�R�R�R�R�R�R[R�R�(((s4/usr/lib/python2.7/site-packages/_pytest/skipping.pyt<module>s0"	
	$j				3