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/nodes.pyo
�
��abc@`sBddlmZmZmZddlmZddlZddlZddl	Z	ddl
Z
ddlZdZe	j
jej�j�Zd�Zd�Ze
jdefd��Y�Zd	efd
��YZdefd��YZd
efd��YZdefd��YZdefd��YZdefd��YZdS(i(tabsolute_importtdivisiontprint_function(tMutableMappingNt/cC`s:|dkrgS|jt�}|djd�|d)|S(s�Split a nodeid into constituent 'parts'.

    Node IDs are strings, and can be things like:
        ''
        'testing/code'
        'testing/code/test_excinfo.py'
        'testing/code/test_excinfo.py::TestFormattedExcinfo::()'

    Return values are lists e.g.
        []
        ['testing', 'code']
        ['testing', 'code', 'test_excinfo.py']
        ['testing', 'code', 'test_excinfo.py', 'TestFormattedExcinfo', '()']
    ti����s::(tsplittSEP(tnodeidtparts((s1/usr/lib/python2.7/site-packages/_pytest/nodes.pyt
_splitnodes
cC`sHt|�}t|�}t|�t|�kr4tS|t|� |kS(s�Return True if the nodeid is a child node of the baseid.

    E.g. 'foo/bar::Baz::()' is a child of 'foo', 'foo/bar' and 'foo/bar::Baz', but not of 'foo/blorp'
    (R
tlentFalse(tbaseidRt
base_partst
node_parts((s1/usr/lib/python2.7/site-packages/_pytest/nodes.pytischildnode)s
t_CompatPropertycB`seZej�Zd�ZRS(cC`s&|dkr|Sttd�|j�S(Ntpytest(tNonetgetattrt
__import__tname(tselftobjtowner((s1/usr/lib/python2.7/site-packages/_pytest/nodes.pyt__get__9s(t__name__t
__module__tattrtibRR(((s1/usr/lib/python2.7/site-packages/_pytest/nodes.pyR5stNodeKeywordscB`sPeZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z	RS(cC`s,||_|j|_it|j6|_dS(N(tnodetparenttTrueRt_markers(RR ((s1/usr/lib/python2.7/site-packages/_pytest/nodes.pyt__init__Fs	cC`sGy|j|SWn1tk
rB|jdkr4�n|jj|SXdS(N(R#tKeyErrorR!Rtkeywords(Rtkey((s1/usr/lib/python2.7/site-packages/_pytest/nodes.pyt__getitem__Ks
cC`s||j|<dS(N(R#(RR'tvalue((s1/usr/lib/python2.7/site-packages/_pytest/nodes.pyt__setitem__SscC`std��dS(Ns"cannot delete key in keywords dict(t
ValueError(RR'((s1/usr/lib/python2.7/site-packages/_pytest/nodes.pyt__delitem__VscC`s>t|j�}|jdk	r4|j|jj�nt|�S(N(tsetR#R!RtupdateR&titer(Rtseen((s1/usr/lib/python2.7/site-packages/_pytest/nodes.pyt__iter__YscC`st|j��S(N(RR1(R((s1/usr/lib/python2.7/site-packages/_pytest/nodes.pyt__len___scC`s
t|�S(N(tlist(R((s1/usr/lib/python2.7/site-packages/_pytest/nodes.pytkeysbscC`sd|jfS(Ns<NodeKeywords for node %s>(R (R((s1/usr/lib/python2.7/site-packages/_pytest/nodes.pyt__repr__es(
RRR$R(R*R,R1R2R4R5(((s1/usr/lib/python2.7/site-packages/_pytest/nodes.pyREs							tNodecB`seZdZdddd�Zed��Zed�Zed�Z	ed�Z
ed�Zed�Zed�Z
d	�Zd
�Zd�Zed��Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zdd�ZeZRS(s~ base class for Collector and Item the test collection tree.
    Collector subclasses have children, Items are terminal nodes.cC`ss||_||_|p|j|_|p0|j|_t|dd�|_t|�|_t	�|_
i|_dS(Ntfspath(RR!tconfigtsessionRRR7RR&R-textra_keyword_matchest_name2pseudofixturedef(RRR!R8R9((s1/usr/lib/python2.7/site-packages/_pytest/nodes.pyR$ms		cC`s|jj|j�S(s6 fspath sensitive hook proxy used to call pytest hooks(R9tgethookproxyR7(R((s1/usr/lib/python2.7/site-packages/_pytest/nodes.pytihook�stModuletClasstInstancetFunctiontFiletItemcC`sJtt|�|�}t|t�r7ttd�|�St||�}|S(NR(Rttypet
isinstanceRR(RRtmaybe_compatproptcls((s1/usr/lib/python2.7/site-packages/_pytest/nodes.pyt_getcustomclass�s
cC`s d|jjt|dd�fS(Ns<%s %r>R(t	__class__RRR(R((s1/usr/lib/python2.7/site-packages/_pytest/nodes.pyR5�scC`skt|dd�}|dkr3t|dd�}n|jjjdtd|d|d|jd|��dS(	sK generate a warning with the given code and message for this
        item. tlocationR7tkwargstcodetmessageRt
fslocationN(RRR=tpytest_logwarningt
call_historictdictR(RRLRMRN((s1/usr/lib/python2.7/site-packages/_pytest/nodes.pytwarn�scC`s7y|jSWn%tk
r2|j�|_}|SXdS(s= a ::-separated string denoting its collection tree address. N(t_nodeidtAttributeErrort_makeid(Rtx((s1/usr/lib/python2.7/site-packages/_pytest/nodes.pyR�s

cC`s|jjd|jS(Ns::(R!RR(R((s1/usr/lib/python2.7/site-packages/_pytest/nodes.pyRU�scC`s
t|j�S(N(thashR(R((s1/usr/lib/python2.7/site-packages/_pytest/nodes.pyt__hash__�scC`sdS(N((R((s1/usr/lib/python2.7/site-packages/_pytest/nodes.pytsetup�scC`sdS(N((R((s1/usr/lib/python2.7/site-packages/_pytest/nodes.pytteardown�scC`sCg}|}x&|dk	r4|j|�|j}qW|j�|S(se return list of all parent collectors up to self,
            starting from root of collection tree. N(RtappendR!treverse(Rtchaintitem((s1/usr/lib/python2.7/site-packages/_pytest/nodes.pyt	listchain�s


cC`slddlm}m}t|tj�r:t||�}nt||�sXtd��n||j|j	<dS(su dynamically add a marker object to the node.

        ``marker`` can be a string or pytest.mark.* instance.
        i(t
MarkDecoratortMARK_GENs'is not a string or pytest.mark.* MarkerN(
t_pytest.markR`RaREtsixtstring_typesRR+R&R(RtmarkerR`Ra((s1/usr/lib/python2.7/site-packages/_pytest/nodes.pyt
add_marker�scC`sW|jj|d�}|dk	rSddlm}m}t|||f�rS|SndS(sf get a marker object from this node or None if
        the node doesn't have a marker with that name. i(tMarkInfoR`N(R&tgetRRbRgR`RE(RRtvalRgR`((s1/usr/lib/python2.7/site-packages/_pytest/nodes.pyt
get_marker�s
cC`s:t�}|}x$|j�D]}|j|j�qW|S(s< Return a set of all extra keywords in self and any parents.(R-R_R.R:(Rtextra_keywordsR^((s1/usr/lib/python2.7/site-packages/_pytest/nodes.pytlistextrakeywords�s
	cC`s g|j�D]}|j^q
S(N(R_R(RRV((s1/usr/lib/python2.7/site-packages/_pytest/nodes.pyt	listnames�scC`s|jjj||�dS(s� register a function to be called when this node is finalized.

        This method can only be called when this node is active
        in a setup chain, for example during self.setup().
        N(R9t_setupstatetaddfinalizer(Rtfin((s1/usr/lib/python2.7/site-packages/_pytest/nodes.pyRo�scC`s0|}x#|r+t||�r+|j}q	W|S(s] get the next parent node (including ourself)
        which is an instance of the given class(RER!(RRGtcurrent((s1/usr/lib/python2.7/site-packages/_pytest/nodes.pyt	getparent�s
cC`sdS(N((Rtexcinfo((s1/usr/lib/python2.7/site-packages/_pytest/nodes.pyt_prunetraceback�scC`s@|jj}|j|j�r+|jj�St}|jjj	rId}net
jj|j
dg�}|j|�t|j
�dkr�||_
nt}|dkr�d}n|dkr�|jjjdkr�d}q�d}nytj�t}Wntk
rt}nX|jdtd|d|jjjd	|d
|�S(Ntlongi����itautotshorttfuncargstabspatht
showlocalststylettbfilter(R9t_fixturemanagert
errisinstancetFixtureLookupErrorR)t
formatreprR"R8toptiont	fulltracet_pytestt_codet	Tracebackt	tracebackRtRRRttbstyletostgetcwdtOSErrortgetreprRz(RRsR{tfmR|ttbRy((s1/usr/lib/python2.7/site-packages/_pytest/nodes.pyt_repr_failure_pys2
	
			



N( RRt__doc__RR$tpropertyR=RR>R?R@RARBRCRHR5RRRRURXRYRZR_RfRjRlRmRoRrRtR�trepr_failure(((s1/usr/lib/python2.7/site-packages/_pytest/nodes.pyR6is6																	 t	CollectorcB`s?eZdZdefd��YZd�Zd�Zd�ZRS(sf Collector instances create children through collect()
        and thus iteratively build a tree.
    tCollectErrorcB`seZdZRS(s8 an error during collection, contains a custom message. (RRR�(((s1/usr/lib/python2.7/site-packages/_pytest/nodes.pyR�)scC`std��dS(sa returns a list of children (items and collectors)
            for this collection node.
        tabstractN(tNotImplementedError(R((s1/usr/lib/python2.7/site-packages/_pytest/nodes.pytcollect,scC`s?|j|j�r,|j}t|jd�S|j|dd�S(s! represent a collection failure. iR{Rw(R~R�R)tstrtargsR�(RRstexc((s1/usr/lib/python2.7/site-packages/_pytest/nodes.pyR�2s	cC`sdt|d�r`|j}|jd|j�}||krN|jdt�}n|j�|_ndS(NR7tpathtexcludepath(thasattrR�tcutR7ttracebackcutdirtfilter(RRsR�t
ntraceback((s1/usr/lib/python2.7/site-packages/_pytest/nodes.pyRt9s	(RRR�t	ExceptionR�R�R�Rt(((s1/usr/lib/python2.7/site-packages/_pytest/nodes.pyR�$s
		tFSCollectorcB`s,eZdddd�Zd�Zd�ZRS(cC`s�tjj|�}|j}|dk	r`|j|j�}|rH|}n|jtj	t
�}ntt|�j
||||�||_dS(N(tpyR�tlocaltbasenameRtreltoR7treplaceR�tsepRtsuperR�R$(RR7R!R8R9Rtrel((s1/usr/lib/python2.7/site-packages/_pytest/nodes.pyR$Cs		cC`sFx?|jjD]1}|jj|�|kr
|jj|j�Sq
WdS(N(R9t
_initialpathsR7tcommonR�tdirname(Rtinitialpath((s1/usr/lib/python2.7/site-packages/_pytest/nodes.pyt_check_initialpaths_for_relpathNscC`sX|jj|jj�}|s-|j�}ntjtkrT|jtjt�}n|S(N(	R7R�R8trootdirR�R�R�RR�(Rtrelpath((s1/usr/lib/python2.7/site-packages/_pytest/nodes.pyRUSsN(RRRR$R�RU(((s1/usr/lib/python2.7/site-packages/_pytest/nodes.pyR�Bs	RBcB`seZdZRS(s. base class for collecting tests from a file. (RRR�(((s1/usr/lib/python2.7/site-packages/_pytest/nodes.pyRB]sRCcB`sGeZdZdZdddd�Zd�Zd�Zed��Z	RS(sv a basic test invocation item. Note that for a single function
    there might be multiple test invocation items.
    cC`s,tt|�j||||�g|_dS(N(R�RCR$t_report_sections(RRR!R8R9((s1/usr/lib/python2.7/site-packages/_pytest/nodes.pyR$gscC`s&|r"|jj|||f�ndS(s$
        Adds a new report section, similar to what's done internally to add stdout and
        stderr captured output::

            item.add_report_section("call", "stdout", "report section contents")

        :param str when:
            One of the possible capture states, ``"setup"``, ``"call"``, ``"teardown"``.
        :param str key:
            Name of the section, can be customized at will. Pytest uses ``"stdout"`` and
            ``"stderr"`` internally.

        :param str content:
            The full contents as a string.
        N(R�R[(RtwhenR'tcontent((s1/usr/lib/python2.7/site-packages/_pytest/nodes.pytadd_report_sectionkscC`s|jddfS(NR(R7R(R((s1/usr/lib/python2.7/site-packages/_pytest/nodes.pyt
reportinfo~scC`s�y|jSWn�tk
r�|j�}|jjjdi�}y||d}Wn8tk
r�|jjj	|d�}|||d<nX||dt
|d�f}||_|SXdS(Nt_bestrelpathcacheiii(t	_locationRTR�R8t__dict__t
setdefaultR%R9R7tbestrelpathR�(RRJtcacheR7((s1/usr/lib/python2.7/site-packages/_pytest/nodes.pyRJ�s

	N(
RRR�RtnextitemR$R�R�R�RJ(((s1/usr/lib/python2.7/site-packages/_pytest/nodes.pyRCas		(t
__future__RRRtcollectionsRtMappingMixinR�RcR�RR�RR�R�t__file__tdirpathR�R
RtstobjectRRR6R�R�RBRC(((s1/usr/lib/python2.7/site-packages/_pytest/nodes.pyt<module>s$			$�