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/mark/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

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

05d�R�@s�ddlZddlZddlZddlZddlmZddlmZddlmZddlm	Z	ddlm
Z
ddlmZddlmZdd	lm
Z
dd
lmZddlmZddlmZdd
lmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlm Z ddl!m"Z"ddl#m$Z$ddl%m&Z&e�rvddl'm(Z(dZ)e*d �d!d"�Z+e ee,d#d$�d%d&�Z-Gd'd(�d(e�Z.eej/d)d*�Gd+d,�d,���Z0ed-eed.e1fe2fd/�Z3ej/Gd0d#�d#��Z4d)d1�ee1e2fe*ee0d2�d3d4�Z5e	ee0e4fe	e0d5�d6d7�Z6e0dd8�d9d:�Z7e�r�dd;l8m9Z9Gd<d=�d=e4�Z:Gd>d?�d?e4�Z;Gd@dA�dAe4�Z<GdBdC�dCe4�Z=GdDdE�dEe4�Z>GdFdG�dGe4�Z?eGdHdI�dI��Z@e@d)dJ�ZAeGdKdL�dLe
e,ef��ZBdS)M�N)�Any)�Callable)�
Collection)�Iterable)�Iterator)�List)�Mapping)�MutableMapping)�
NamedTuple)�Optional)�overload)�Sequence)�Set)�Tuple)�Type)�
TYPE_CHECKING)�TypeVar)�Union�)�getfslineno)�
ascii_escaped)�final)�NOTSET)�
NotSetType)�Config)�check_ispytest)�fail)�PytestUnknownMarkWarning)�NodeZempty_parameter_set_mark��returncCst|�ot|dd�dkS)N�__name__z<lambda>)�callable�getattr)�func�r%�;/usr/lib/python3.9/site-packages/_pytest/mark/structures.py�
istestfunc)sr'�
MarkDecorator)�config�argnamesr cCs�ddlm}t|�\}}d||j||f}|�t�}|dvrJtj|d�}nR|dkrbtj|dd�}n:|d	kr�|j}	t|�\}
}|�	d
|	|df��nt
|��|S)Nr)�	Collectorz0got empty parameter set %r, function %s at %s:%d)�N�skip��reason�xfailF)r/�runZfail_at_collectz&Empty parameter set in '%s' at line %d�)�nodesr+rr!�getini�EMPTY_PARAMETERSET_OPTION�MARK_GENr-r0ZCollectError�LookupError)r)r*r$r+Zfs�linenor/Zrequested_mark�markZf_name�_r%r%r&�get_empty_parameterset_mark-s*�
�r;c	@sLeZdZUeeeefed<eeded<e	e
ed<eddd�eedeedfe	e
dd	�d
d��Zededeeefe
dd
�dd��Zeee
ee
feedeeefeee
e
fd�dd��Zeeedeeefe
edd�dd��Zeee
ee
feedeeefee
eee
edfd�dd��ZdS)�ParameterSet�values)r(�Mark�marks�idr%N�r?r@r()r=r?r@r cGsbt|t�r|f}nt|tjj�s$J�|durVt|t�sNtdt|��d|����t|�}||||�S)Nz Expected id to be a string, got z: )	�
isinstancer(�collections�abcr�str�	TypeError�typer)�clsr?r@r=r%r%r&�paramOs

zParameterSet.paramF)�parameterset�force_tupler cCs.t||�r|S|r|�|�S||gdd�SdS)ajExtract from an object or objects.

        :param parameterset:
            A legacy style parameterset that may or may not be a tuple,
            and may or may not be wrapped into a mess of mark objects.

        :param force_tuple:
            Enforce tuple wrapping so single argument tuple values
            don't get decomposed and break tests.
        NrA)rBrI)rHrJrKr%r%r&�extract_fromas


zParameterSet.extract_from)r*�	argvaluesr cOs8t|t�r,dd�|�d�D�}t|�dk}nd}||fS)NcSsg|]}|��r|���qSr%)�strip��.0�xr%r%r&�
<listcomp>��z8ParameterSet._parse_parametrize_args.<locals>.<listcomp>�,r2F)rBrE�split�len)r*rM�args�kwargsrKr%r%r&�_parse_parametrize_args~s

z$ParameterSet._parse_parametrize_args)rMrKr cs�fdd�|D�S)Ncsg|]}tj|�d��qS)�rK)r<rLrOrZr%r&rR�sz>ParameterSet._parse_parametrize_parameters.<locals>.<listcomp>r%)rMrKr%rZr&�_parse_parametrize_parameters�s
�z*ParameterSet._parse_parametrize_parameters)r*rMr)�nodeidr c	Cs�|�||�\}}|�||�}~|rl|D]B}t|j�t|�kr&d}	t|	j||j|t|�t|j�d�dd�q&n,t|||�}
|�tt	ft|�|
gdd��||fS)Nz�{nodeid}: in "parametrize" the number of names ({names_len}):
  {names}
must be equal to the number of values ({values_len}):
  {values})r\r=�namesZ	names_lenZ
values_lenF�Zpytrace)r=r?r@)
rYr[rVr=r�formatr;�appendr<r)rHr*rMr$r)r\rK�
parametersrI�msgr9r%r%r&�_for_parametrize�s.	���

�zParameterSet._for_parametrize)F)r!�
__module__�__qualname__r
r�objectr�__annotations__rrrE�classmethodrI�boolrL�staticmethodrrrYrr[rrcr%r%r%r&r<JsH
�����
��r<T)�frozenc
@s�eZdZUdZeed<eedfed<eeefed<e	j
ddd�Zeded	<e	j
ddd�Z
eeeed
<ddd�eeedfeeefedeeeedd�d
d�Zed�dd�Zddd�dd�ZdS)r>zA pytest mark.�name.rWrXNF)�default�repr�_param_ids_from�_param_ids_generated��	_ispytest)rlrWrX�param_ids_from�param_ids_generatedrrr cCsRt|�t�|d|�t�|d|�t�|d|�t�|d|�t�|d|�dS)�:meta private:rlrWrXrorpN)rrf�__setattr__)�selfrlrWrXrsrtrrr%r%r&�__init__�sz
Mark.__init__rcCsd|jvpt|j�dkS)N�ids�)rXrVrW�rwr%r%r&�_has_param_ids�szMark._has_param_ids)�otherr cCsd|j|jksJ�d}|jdkr8|��r,|}n|��r8|}t|j|j|jt|jfi|j��|dd�S)z�Return a new Mark which is a combination of this
        Mark and another Mark.

        Combines by appending args and merging kwargs.

        :param Mark other: The mark to combine with.
        :rtype: Mark
        N�parametrizeT)rsrr)rlr|r>rW�dictrX)rwr}rsr%r%r&�
combined_with�s	

�zMark.combined_with)NN)r!rdre�__doc__rErgrrr�dataclassesZfieldrorrpr
rirxr|r�r%r%r%r&r>�s.
�	��


�r>�Markable.)�boundc@s�eZdZUdZeed<dd�eedd�dd�Zee	d	�d
d��Z
eeedfd	�d
d��Z
eee	efd	�dd��Zee	d	�dd��Zeedd�dd�Zeeed�dd��Zeeedd�dd��Zeed�dd�ZdS)r(abA decorator for applying a mark on test functions and classes.

    ``MarkDecorators`` are created with ``pytest.mark``::

        mark1 = pytest.mark.NAME              # Simple MarkDecorator
        mark2 = pytest.mark.NAME(name1=value) # Parametrized MarkDecorator

    and can then be applied as decorators to test functions::

        @mark2
        def test_function():
            pass

    When a ``MarkDecorator`` is called, it does the following:

    1. If called with a single class as its only positional argument and no
       additional keyword arguments, it attaches the mark to the class so it
       gets applied automatically to all test cases found in that class.

    2. If called with a single function as its only positional argument and
       no additional keyword arguments, it attaches the mark to the function,
       containing all the arguments already stored internally in the
       ``MarkDecorator``.

    3. When called in any other case, it returns a new ``MarkDecorator``
       instance with the original ``MarkDecorator``'s content updated with
       the arguments passed to this call.

    Note: The rules above prevent a ``MarkDecorator`` from storing only a
    single function or class reference as its positional argument with no
    additional keyword or positional arguments. You can work around this by
    using `with_args()`.
    r9FrqN)r9rrr cCst|�||_dS)ruN)rr9)rwr9rrr%r%r&rx1szMarkDecorator.__init__rcCs|jjS)zAlias for mark.name.)r9rlr{r%r%r&rl6szMarkDecorator.name.cCs|jjS)zAlias for mark.args.)r9rWr{r%r%r&rW;szMarkDecorator.argscCs|jjS)zAlias for mark.kwargs.)r9rXr{r%r%r&rX@szMarkDecorator.kwargscCs|jS)ru)rlr{r%r%r&�marknameEszMarkDecorator.markname)rWrXr cOs&t|j||dd�}t|j�|�dd�S)z�Return a MarkDecorator with extra arguments added.

        Unlike calling the MarkDecorator, with_args() can be used even
        if the sole argument is a callable/class.
        Trq)r>rlr(r9r�)rwrWrXr9r%r%r&�	with_argsJszMarkDecorator.with_args��argr cCsdS�Nr%�rwr�r%r%r&�__call__VszMarkDecorator.__call__cOsdSr�r%)rwrWrXr%r%r&r�Zs)rWrXcOsR|rB|sB|d}t�|�}t|�dkrBt|�s2|rBt||j�|S|j|i|��S)zCall the MarkDecorator.rr2)�inspectZisclassrVr'�
store_markr9r�)rwrWrXr$�is_classr%r%r&r�^s
)r!rdrer�r>rgrirx�propertyrErlrrrWrrXr�rfr�rr�r�r%r%r%r&r(s"
"��consider_mro)�objr�r cCs�t|t�r`|s |j�dg�g}ndd�|jD�}g}|D]$}t|t�rR|�|�q8|�|�q8n"t|dg�}t|t�r||}n|g}tt	|��S)aObtain the unpacked marks that are stored on an object.

    If obj is a class and consider_mro is true, return marks applied to
    this class and all of its super-classes in MRO order. If consider_mro
    is false, only return marks applied directly to this class.
    �
pytestmarkcSsg|]}|j�dg��qS)r�)�__dict__�getrOr%r%r&rRxrSz&get_unpacked_marks.<locals>.<listcomp>)
rBrGr�r��__mro__�list�extendr`r#�normalize_mark_list)r�r�Z
mark_lists�	mark_list�itemZmark_attributer%r%r&�get_unpacked_marksis


r�)r�r ccs>|D]4}t|d|�}t|t�s2tdt|��d���|VqdS)z�
    Normalize an iterable of Mark or MarkDecorator objects into a list of marks
    by retrieving the `mark` attribute on MarkDecorator instances.

    :param mark_list: marks to normalize
    :returns: A new list of the extracted Mark objects
    r9zgot z instead of MarkN)r#rBr>rFrn)r�r9Zmark_objr%r%r&r��s


r�)r9r cCs,t|t�sJ|��gt|dd��|�|_dS)zjStore a Mark on an object.

    This is used to implement the Mark declarations/decorators correctly.
    Fr�N)rBr>r�r�)r�r9r%r%r&r��sr�)�
_ScopeNamec@s6eZdZeeed�dd��Zed	edd�dd��ZdS)
�_SkipMarkDecoratorr�cCsdSr�r%r�r%r%r&r��sz_SkipMarkDecorator.__call__.r()r/r cCsdSr�r%)rwr/r%r%r&r��sN).)r!rdrerr�r�rEr%r%r%r&r��sr�c@s8eZdZddd�eeefeeefeed�dd�ZdS)�_SkipifMarkDecorator.r.)�	condition�
conditionsr/r cGsdSr�r%)rwr�r/r�r%r%r&r��sz_SkipifMarkDecorator.__call__N).)r!rdrerrErir(r�r%r%r%r&r��s��

�r�c@steZdZeeed�dd��Zed	ddddd�eeefeeefeeee	e
ee	e
dffeed�dd��ZdS)
�_XfailMarkDecoratorr�cCsdSr�r%r�r%r%r&r��sz_XfailMarkDecorator.__call__.)r/r1�raises�strict)r�r�r/r1r�r�r cGsdSr�r%)rwr�r/r1r�r�r�r%r%r&r��s
N).)
r!rdrerr�r�rrErir�
BaseExceptionrr(r%r%r%r&r��s$��

�r�c
@s�eZdZdddd�eeeefeeeeeefee	eefe
eeedeeee	fe
ege
effe
eed�dd�ZdS)�_ParametrizeMarkDecorator.)�indirectry�scopeN)r*rMr�ryr�r cCsdSr�r%)rwr*rMr�ryr�r%r%r&r��sz"_ParametrizeMarkDecorator.__call__)r!rdrerrEr
rr<rfrir�float�intrrr�r(r�r%r%r%r&r��s"�����r�c@seZdZeed�dd�ZdS)�_UsefixturesMarkDecorator)�fixturesr cGsdSr�r%)rwr�r%r%r&r��sz"_UsefixturesMarkDecorator.__call__N�r!rdrerEr(r�r%r%r%r&r��sr�c@seZdZeed�dd�ZdS)�_FilterwarningsMarkDecorator)�filtersr cGsdSr�r%)rwr�r%r%r&r��sz%_FilterwarningsMarkDecorator.__call__Nr�r%r%r%r&r��sr�c@sleZdZUdZerBeed<eed<eed<e	ed<e
ed<eed<dd	�ed
d�dd
�Z
eed�dd�Zd
S)�
MarkGeneratoraFactory for :class:`MarkDecorator` objects - exposed as
    a ``pytest.mark`` singleton instance.

    Example::

         import pytest

         @pytest.mark.slowtest
         def test_function():
            pass

    applies a 'slowtest' :class:`Mark` on ``test_function``.
    r-Zskipifr0r~Zusefixtures�filterwarningsFrqN)rrr cCst|�d|_t�|_dSr�)r�_config�set�_markers)rwrrr%r%r&rx�szMarkGenerator.__init__)rlr cCs�|ddkrtd��|jdur�||jvrb|j�d�D],}|�d�d�d�d��}|j�|�q4||jvr�|jjjs�|jjj	r�t
|�d�d	d
�|dvr�d}t
d
|�d��t�d|t
d�tt|didd�dd�S)z:Generate a new :class:`MarkDecorator` with the given name.rr:z*Marker name must NOT start with underscoreNZmarkers�:�(z, not found in `markers` configuration optionFr^)ZparameterizeZparametriseZparameteriseTz	Unknown 'z#' mark, did you mean 'parametrize'?z�Unknown pytest.mark.%s - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.htmlrr%rq)�AttributeErrorr�r�r4rUrN�add�optionZstrict_markersr�r�warnings�warnrr(r>)rwrl�lineZmarkerZ__tracebackhide__r%r%r&�__getattr__s0


���zMarkGenerator.__getattr__)r!rdrer�rr�rgr�r�r�r�r�rirxrEr(r�r%r%r%r&r��s
r�rqc@s�eZdZdZddd�dd�Zeed�dd	�Zeedd
�dd�Ze	e
d�d
d�Zdee
eefeeeeffedd�dd�Zedd�dd�Zeed�dd�Zed�dd�Zed�dd�ZdS)�NodeKeywords)�node�parentr�rN)r�r cCs||_|j|_|jdi|_dS)NT)r�r�rlr�)rwr�r%r%r&rx5szNodeKeywords.__init__)�keyr cCs<z|j|WSty6|jdur&�|jj|YS0dSr�)r��KeyErrorr��keywords�rwr�r%r%r&�__getitem__:s
zNodeKeywords.__getitem__)r��valuer cCs||j|<dSr�)r�)rwr�r�r%r%r&�__setitem__BszNodeKeywords.__setitem__cCs ||jvp|jduo||jjvSr��r�r�r�r�r%r%r&�__contains__Hs


�zNodeKeywords.__contains__r%)r}�kwdsr cKs|j�|�|j�|�dSr�)r��update)rwr}r�r%r%r&r�OszNodeKeywords.updatecCstd��dS)Nz"cannot delete key in keywords dict)�
ValueErrorr�r%r%r&�__delitem__WszNodeKeywords.__delitem__rccs8|jEdH|jdur4|jjD]}||jvr|VqdSr�r�)rw�keywordr%r%r&�__iter__Zs


zNodeKeywords.__iter__cCstdd�|D��S)Ncss|]
}dVqdS)r2Nr%)rPr�r%r%r&�	<genexpr>erSz'NodeKeywords.__len__.<locals>.<genexpr>)�sumr{r%r%r&�__len__cszNodeKeywords.__len__cCsd|j�d�S)Nz<NodeKeywords for node �>)r�r{r%r%r&�__repr__gszNodeKeywords.__repr__)r%)r!rdre�	__slots__rxrErr�r�rfrir�rrrrr�r�rr�r�r�r�r%r%r%r&r�1s	��	r�)C�collections.abcrCr�r�r��typingrrrrrrrr	r
rrr
rrrrrr�_coder�compatrrrrZ_pytest.configrZ_pytest.deprecatedrZ_pytest.outcomesrZ_pytest.warning_typesrr3rr5rir'rEr;r<Z	dataclassr>rfrGr�r(r�r�r�Z
_pytest.scoper�r�r�r�r�r�r�r�r6r�r%r%r%r&�<module>s��v
F`�
� �
		G


Youez - 2016 - github.com/yon3zu
LinuXploit