403Webshell
Server IP : 127.0.0.1  /  Your IP : 216.73.216.109
Web Server : Apache/2.4.54 (Win64) OpenSSL/1.1.1q PHP/8.1.10
System : Windows NT DESKTOP-E5T4RUN 10.0 build 19045 (Windows 10) AMD64
User : SERVERWEB ( 0)
PHP Version : 8.1.10
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : OFF |  Perl : OFF |  Python : OFF |  Sudo : OFF |  Pkexec : OFF
Directory :  C:/cygwin64/lib/python3.9/site-packages/_pytest/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : C:/cygwin64/lib/python3.9/site-packages/_pytest/__pycache__/skipping.cpython-39.pyc
a

05d�'�@s
dZddlZddlZddlZddlZddlZddlmZddlm	Z	ddlm
Z
ddlmZddlmZddl
mZdd	l
mZdd
lmZddlmZddlmZdd
lmZddlmZddlmZddlmZddlmZddlmZedd�dd�Z edd�dd�Z!eee"ee#e$fd�dd�Z%ej&dd�Gdd�d��Z'ee
e'd �d!d"�Z(ej&dd�Gd#d$�d$��Z)ee
e)d �d%d&�Z*ee
e)�Z+edd'�edd �d(d)��Z,edd*�ee	d+d �d,d-��Z-edd*�eedd.�d/d0��Z.ee
ee$e$e$fd1�d2d3�Z/dS)4z-Support for skip/xfail functions and markers.�N)�Mapping)�	Generator)�Optional)�Tuple)�Type)�Config)�hookimpl)�Parser)�Mark)�Item)�fail)�skip)�xfail)�
BaseReport)�CallInfo)�StashKey)�parser�returncCs4|�d�}|jdddddd�|jdd	dd
d�dS)NZgeneralz
--runxfail�
store_true�runxfailFz<Report the results of xfail tests as if they were not marked)�action�dest�default�help�xfail_strictz\Default for the strict parameter of xfail markers when not given explicitly (default: False)�bool)r�type)ZgetgroupZ	addoptionZaddini)r�group�r�4/usr/lib/python3.9/site-packages/_pytest/skipping.py�pytest_addoptions
��r )�configrcsn|jjrFddl��j�|���fdd��dd�}tj|_t�d|�|�dd�|�dd	�|�dd
�dS)Nrcst�d��S)Nr)�setattrr��old�pytestrr�<lambda>3�z"pytest_configure.<locals>.<lambda>c_sdS)Nr)�args�kwargsrrr�nop5szpytest_configure.<locals>.noprZmarkersz�skip(reason=None): skip the given test function with an optional reason. Example: skip(reason="no way of currently testing this") skips the test.askipif(condition, ..., *, reason=...): skip the given test function if any of the conditions evaluate to True. Example: skipif(sys.platform == 'win32') skips the test if we are on the win32 platform. See https://docs.pytest.org/en/stable/reference/reference.html#pytest-mark-skipifaxfail(condition, ..., *, reason=..., run=True, raises=None, strict=xfail_strict): mark the test function as an expected failure if any of the conditions evaluate to True. 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 https://docs.pytest.org/en/stable/reference/reference.html#pytest-mark-xfail)�optionrr%rZadd_cleanup�	Exceptionr"Zaddinivalue_line)r!r*rr#r�pytest_configure-s&���r-)�item�mark�	conditionrc
Cst|t��rRttt|jd�}t|jj|jd��D]&}t|t	�sLt
d�|���|�|�q0t
|d�rp|�|jj�z(d|j�d�}t||d�}t||�}Wn�ty�}zFd|jd	|d	d
|jp�ddd
g}	td�|	�dd�WYd}~nbd}~0t�yN}z@d|jd	|gt�t|�|��}	td�|	�dd�WYd}~n
d}~00nbzt|�}WnTt�y�}z:d|jgt�t|�|��}	td�|	�dd�WYd}~n
d}~00|j�dd�}
|
du�r�t|t��r�d|}
nd|jd}t|dd�||
fS)a.Evaluate a single skipif/xfail condition.

    If an old-style string condition is given, it is eval()'d, otherwise the
    condition is bool()'d. If this fails, an appropriately formatted pytest.fail
    is raised.

    Returns (result, reason). The reason is only relevant if the result is True.
    )�os�sys�platformr!)r!z<pytest_markeval_namespace() needs to return a dict, got {!r}�obj�<z condition>�evalzError evaluating %r conditionz    � r�^zSyntaxError: invalid syntax�
F)ZpytraceNz*Error evaluating %r condition as a boolean�reasonzcondition: zError evaluating %r: zDyou need to specify reason=STRING when using booleans as conditions.)�
isinstance�strr1r2r3r!�reversedZihookZpytest_markeval_namespacer�
ValueError�format�update�hasattrr4�__globals__�name�compiler6�SyntaxError�offsetr�joinr,�	traceback�format_exception_onlyrrr)�get)r.r/r0�globals_Z
dictionary�filenameZcondition_code�result�excZmsglinesr:�msgrrr�evaluate_conditionTsl
��
��
�&��*��(

��rPT)�frozenc@seZdZUdZdZeed<dS)�Skipz$The result of evaluate_skip_marks().zunconditional skipr:N)�__name__�
__module__�__qualname__�__doc__r:r<�__annotations__rrrrrR�s
rR)r.rcCs�|jdd�D]n}d|jvr"|j}n|jdf}|sL|j�dd�}t|�S|D](}t|||�\}}|rPt|�SqPq|jdd�D]T}zt|ji|j��WSty�}ztt|�d�d�WYd}~q�d}~00q�dS)	zDEvaluate skip and skipif marks on item, returning Skip if triggered.Zskipif�rCr0r:�r
z& - maybe you meant pytest.mark.skipif?N)�iter_markersr)r(rJrRrP�	TypeErrorr<)r.r/�
conditionsr:r0rM�errr�evaluate_skip_marks�s"
*r^c@sFeZdZUdZdZeed<eed<eed<ee	e
edfed<dS)	�Xfailz%The result of evaluate_xfail_marks().)r:�run�strict�raisesr:r`ra.rbN)rSrTrUrV�	__slots__r<rWrrrr�
BaseExceptionrrrrr_�s
r_c	Cs�|jdd�D]�}|j�dd�}|j�d|j�d��}|j�dd�}d	|jvrT|j}n|jd	f}|s�|j�d
d�}t||||�S|D].}t|||�\}}|r�t||||�Sq�qdS)z;Evaluate xfail marks on item, returning Xfail if triggered.rrXr`TrarrbNr0r:rY)rZr)rJr!Zgetinir(r_rP)	r.r/r`rarbr\r:r0rMrrr�evaluate_xfail_marks�s
re)ZtryfirstcCsTt|�}|rtj|jdd��t|�|jt<}|rP|jjj	sP|j
sPtd|j�dS)NT)Z_use_item_location�	[NOTRUN] )r^r
r,r:re�stash�xfailed_keyr!r+rr`r)r.�skipped�xfailedrrr�pytest_runtest_setup�srk)Zhookwrapper)NNNccs||j�td�}|dur(t|�|jt<}|rJ|jjjsJ|jsJtd|j	�dV|j�td�}|durxt|�|jt<}dS)Nrf)
rgrJrhrer!r+rr`rr:)r.rjrrr�pytest_runtest_call�srl)r.�callccs�dV}|��}|j�td�}|jjjr(n�|jrht|jj	t
j�rh|jj	jdusPJ�d|jj	j|_
d|_nv|js�|r�|jr�|j}|dur�t|jj	|�s�d|_q�d|_|j|_
n2|jdkr�|jr�d|_d|j|_nd|_|j|_
dS)Nzreason: riZfailedrmz[XPASS(strict)] �passed)Z
get_resultrgrJrhr!r+r�excinfor;�valuerr,rO�wasxfail�outcomerirbr:ZwhenraZlongrepr)r.rmrrZreprjrbrrr�pytest_runtest_makereports,



rs)�reportrcCs"t|d�r|jrdS|jrdSdS)Nrq)rj�xZXFAIL)Zxpassed�XZXPASS)rArirn)rtrrr�pytest_report_teststatus#s
rw)0rVZdataclassesr1r3r2rH�collections.abcr�typingrrrrZ_pytest.configrrZ_pytest.config.argparsingr	Z_pytest.mark.structuresr
Z
_pytest.nodesrZ_pytest.outcomesrr
rZ_pytest.reportsrZ_pytest.runnerrZ
_pytest.stashrr r-�objectrr<rPZ	dataclassrRr^r_rerhrkrlrsrwrrrr�<module>sL'K




Youez - 2016 - github.com/yon3zu
LinuXploit