403Webshell
Server IP : 209.209.40.120  /  Your IP : 216.73.217.112
Web Server : Microsoft-IIS/10.0
System : Windows NT NEWWWW 10.0 build 17763 (Windows Server 2019) i586
User : NEWWWW$ ( 0)
PHP Version : 8.3.30
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/Python312/Lib/site-packages/_pytest/mark/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Python312/Lib/site-packages/_pytest/mark/__pycache__/expression.cpython-312.pyc
�

��Hg�'����dZddlmZddlZddlZddlZddlZddlZddlZddl	m
Z
ddl	mZddl	mZddl	m
Z
ddl	mZdd	l	mZdd
l	mZddgZGd
�dej$�Zej(d��Gd�d��ZGd�de�ZGd�d�ZdZd&d�Zd'd�Zd'd�Zd'd�Zdddd�Zd(d�Zd)d�Z Gd�d e�Z!ej(Gd!�d"��Z"Gd#�d$ee#e"f�Z$Gd%�d�Z%y)*aEvaluate match expressions, as used by `-k` and `-m`.

The grammar is:

expression: expr? EOF
expr:       and_expr ('or' and_expr)*
and_expr:   not_expr ('and' not_expr)*
not_expr:   'not' not_expr | '(' expr ')' | ident kwargs?

ident:      (\w|:|\+|-|\.|\[|\]|\\|/)+
kwargs:     ('(' name '=' value ( ', ' name '=' value )*  ')')
name:       a valid ident, but not a reserved keyword
value:      (unescaped) string literal | (-)?[0-9]+ | 'False' | 'True' | 'None'

The semantics are:

- Empty expression evaluates to False.
- ident evaluates to True or False according to a provided matcher function.
- or/and/not evaluate according to the usual boolean semantics.
- ident with parentheses and keyword arguments evaluates to True or False according to a provided matcher function.
�)�annotationsN)�Iterator)�Literal)�Mapping)�NoReturn)�overload)�Protocol)�Sequence�
Expression�
ParseErrorc�4�eZdZdZdZdZdZdZdZdZ	dZ
d	Zd
Zy)�	TokenTypezleft parenthesiszright parenthesis�or�and�not�
identifierzend of input�=zstring literal�,N)
�__name__�
__module__�__qualname__�LPAREN�RPAREN�OR�AND�NOT�IDENT�EOF�EQUAL�STRING�COMMA���9C:\Python312\Lib\site-packages\_pytest/mark/expression.pyrr.s4��
�F�
 �F�	
�B�
�C�
�C��E�
�C��E�
�F��Er#rT)�frozenc�0�eZdZUdZded<ded<ded<y)	�Token)�type�value�posrr(�strr)�intr*N)rrr�	__slots__�__annotations__r"r#r$r'r';s��(�I�
�O��J�	�Hr#r'c� �eZdZdZdd�Zdd�Zy)rz�The expression contains invalid syntax.

    :param column: The column in the line where the error occurred (1-based).
    :param message: A description of the error.
    c� �||_||_y�N��column�message)�selfr3r4s   r$�__init__zParseError.__init__Js�������r#c�:�d|j�d|j��S)Nz
at column z: r2�r5s r$�__str__zParseError.__str__Ns���D�K�K�=��4�<�<�.�9�9r#N)r3r,r4r+�return�None)r:r+)rrr�__doc__r6r9r"r#r$rrCs����:r#c�j�eZdZdZdd�Zdd�Zed
d��Zedd�					dd��Zdd�dd�Zdd	�Zy
)�Scanner)�tokens�currentc�d�|j|�|_t|j�|_yr1)�lexr?�nextr@)r5�inputs  r$r6zScanner.__init__Us!���h�h�u�o����D�K�K�(��r#c#��K�d}|t|�k�r4||dvr|dz
}�n||dk(r$ttjd|���|dz
}�n�||dk(r$ttjd|���|dz
}�n�||dk(r$ttj
d|���|dz
}�n�||dk(r$ttjd|���|dz
}�nf||x}dvr�|j||dz�}|d	k(rt|dzd
|�d���|||dz}|jd�x}d	k7rt|dzd
��ttj||���|t|�z
}n�tjd||d�}|r�|jd�}|dk(rttj||���nc|dk(rttj||���n@|dk(rttj||���nttj ||���|t|�z
}nt|dzd||�d���|t|�kr��4ttj"d|���y�w)Nr)� �	��(�)rr)�'�"���zclosing quote "z" is missing�\z4escaping with "\" not supported in marker expressionz(:?\w|:|\+|-|\.|\[|\]|\\|/)+rrrzunexpected character "rL�)�lenr'rrrrr!�findrr �re�match�grouprrrrr)r5rDr*�
quote_char�
end_quote_posr)�
backslash_posrSs        r$rBzScanner.lexYsb�������C��J���S�z�[�(��q����s��s�"��I�,�,�c�3�7�7��q����s��s�"��I�,�,�c�3�7�7��q����s��s�"��I�O�O�S�#�6�6��q����s��s�"��I�O�O�S�#�6�6��q��� %�c�
�*�*�z�9� %�
�
�:�s�Q�w� ?�
� �B�&�$��a��)�*��\�B����c�M�A�$5�6��%*�Z�Z��%5�5�M�"�<�$�%��)�O����I�,�,�e�S�9�9��s�5�z�!�����!@�%���+�N���!�K�K��N�E���}�#�I�L�L�%��=�=��%��#�I�M�M�5�#�>�>��%��#�I�M�M�5�#�>�>�#�I�O�O�U�C�@�@��3�u�:�%�C�$��a��0��s���A�>���Y�C��J��`�I�M�M�2�s�+�+�s�II&�I&c��yr1r"�r5r(�rejects   r$�acceptzScanner.accept�s��JMr#F�rZc��yr1r"rYs   r$r[zScanner.accept�s��r#c���|jj|urD|j}|jtjurt	|j
�|_|S|r|j
|f�yr1)r@r(rrrCr?rZ)r5r(rZ�tokens    r$r[zScanner.accept�sV���<�<����$��L�L�E��z�z����.�#�D�K�K�0����L���K�K��� �r#c	���t|jjdzdjdj	d�|D��|jj
j���)NrHzexpected {}; got {}z OR c3�4K�|]}|j���y�wr1)r))�.0r(s  r$�	<genexpr>z!Scanner.reject.<locals>.<genexpr>�s����<�4�D�J�J�<�s�)rr@r*�format�joinr(r))r5�expecteds  r$rZzScanner.reject�sT����L�L���q� �!�(�(����<�8�<�<����!�!�'�'�
�
�	
r#N)rDr+r:r;)rDr+r:zIterator[Token])r(rrZz
Literal[True]r:r')r(rrZzLiteral[False]r:�Token | None)r(rrZ�boolr:rg)rfzSequence[TokenType]r:r)	rrrr-r6rBrr[rZr"r#r$r>r>Rs^��%�I�)�2,�h�M��M�
�;@����*8��	����9>��
r#r>�$c��|jtj�rtjd�}n,t|�}|jtjd��tjtj|��S)NFTr\)r[rr�ast�Constant�expr�fix_missing_locationsr��s�rets  r$�
expressionrr�sW���x�x�	�
�
�����U�+���1�g��	������t��,��$�$�S�^�^�C�%8�9�9r#c��t|�}|jtj�rUt|�}t	j
t	j�||g�}|jtj�r�U|Sr1)�and_exprr[rrrk�BoolOp�Or�rprq�rhss   r$rmrm�sW��
�1�+�C�
�(�(�9�<�<�
 ��q�k���j�j�����C��:�.���(�(�9�<�<�
 ��Jr#c��t|�}|jtj�rUt|�}t	j
t	j�||g�}|jtj�r�U|Sr1)�not_exprr[rrrkru�Andrws   r$rtrt�sW��
�1�+�C�
�(�(�9�=�=�
!��q�k���j�j�����S�#�J�/���(�(�9�=�=�
!��Jr#c�<�|jtj�r1tjtj
�t
|��S|jtj�r.t|�}|jtjd��|S|jtj�}|r�tjt|jztj��}|jtj�rDtj|gt!|���}|jtjd��|S|}|S|j#tjtjtjf�y)NTr\)�func�args�keywords)r[rrrk�UnaryOp�Notrzrrmrr�Name�IDENT_PREFIXr)�Load�Call�
all_kwargsrZ)rprq�ident�names    r$rzrz�s	���x�x�	�
�
���{�{�3�7�7�9�h�q�k�2�2��x�x�	� � �!��1�g��	����!�!�$��/��
�
�H�H�Y�_�_�%�E���x�x��u�{�{�2�C�H�H�J�?���8�8�I�$�$�%��(�(��2�
�1�
�F�C�
�H�H�Y�%�%�d�H�3��
��C��
��H�H�i�m�m�Y�-�-�y���
?�@r#F)�True�Falser;c���|jtjd��}|jj	�s&t|jdzd|j����tj|j�r't|jdzd|j�d���|jtjd��|jtj�x}r|jdd}n�|jtjd��}|jx}j�s$|jd�r|ddj�rt|�}nM|jtvrt|j}n't|jdzd	|j�d
���tj|jtj |��}|S)NTr\rHznot a valid python identifier z$unexpected reserved python keyword `�`rM�-zunexpected character/s "rL)r[rrr)�isidentifierrr*�keyword�	iskeywordrr �isdigit�
startswithr,�BUILTIN_MATCHERSrkrl)rp�keyword_name�value_tokenr)�numberrqs      r$�single_kwargr��s����8�8�I�O�O�D�8�9�L����*�*�,�����q� �,�\�-?�-?�,@�A�
�	
�����+�+�,�����q� �2�<�3E�3E�2F�a�H�
�	
��H�H�Y�_�_�T�H�*��h�h�y�/�/�0�0�{�0�)4�):�):�1�R�)@���h�h�y���t�h�<��"�(�(�
(�V�1�1�3�� � ��%��q�r�
�"�"�$���K�E�
�
�
�"2�
2�$�[�%6�%6�7�E�����!�#�*�;�+<�+<�*=�Q�?��
�
�+�+�l�(�(�#�,�,�u�*=�
>�C��Jr#c���t|�g}|jtj�r:|j	t|��|jtj�r�:|Sr1)r�r[rr!�appendros  r$r�r�sE����?�
�C�
�(�(�9�?�?�
#��
�
�<��?�#��(�(�9�?�?�
#��Jr#c��eZdZdd�Zy)�MatcherCallc��yr1r")r5r��kwargss   r$�__call__zMatcherCall.__call__s��QTr#N)r�r+r��str | int | bool | Noner:rh)rrrr�r"r#r$r�r�
s��Tr#r�c�2�eZdZUded<ded<dd�Zd	d�Zy)
�MatcherNameAdapterr��matcherr+r�c�8�|j|j�Sr1�r�r�r8s r$�__bool__zMatcherNameAdapter.__bool__s���|�|�D�I�I�&�&r#c�<�|j|jfi|��Sr1r�)r5r�s  r$r�zMatcherNameAdapter.__call__s���t�|�|�D�I�I�0��0�0r#N)r:rh)r�r�r:rh)rrrr.r�r�r"r#r$r�r�s��
��

�I�'�1r#r�c�0�eZdZdZdd�Zdd�Zd	d�Zd
d�Zy)�MatcherAdapterzDAdapts a matcher function to a locals mapping as required by eval().c��||_yr1)r�)r5r�s  r$r6zMatcherAdapter.__init__s	����r#c�P�t|j|tt�d��S)Nr�)r�r�rPr�)r5�keys  r$�__getitem__zMatcherAdapter.__getitem__ s ��!�$�,�,�S��\�AR�AT�=U�V�Vr#c��t��r1��NotImplementedErrorr8s r$�__iter__zMatcherAdapter.__iter__#���!�#�#r#c��t��r1r�r8s r$�__len__zMatcherAdapter.__len__&r�r#N)r�r�r:r;)r�r+r:r�)r:z
Iterator[str])r:r,)rrrr<r6r�r�r�r"r#r$r�r�s��N��W�$�$r#r�c�6�eZdZdZdZdd�Zedd��Zd	d�Zy)
rzwA compiled match expression as used by -k and -m.

    The expression can be evaluated against different matchers.
    ��codec��||_yr1r�)r5r�s  r$r6zExpression.__init__2s	����	r#c�\�tt|��}t|dd��}t|�S)z\Compile a match expression.

        :param input: The input expression - one line.
        z<pytest match expression>�eval)�filename�mode)rrr>�compiler)r5rD�astexprr�s    r$r�zExpression.compile5s2���W�U�^�,��&��0�� 
��
�$��r#c	�\�tt|jdiit|���}|S)a	Evaluate the match expression.

        :param matcher:
            Given an identifier, should return whether it matches or not.
            Should be prepared to handle arbitrary strings as input.

        :returns: Whether the expression matches or not.
        �__builtins__)rhr�r�r�)r5r�rqs   r$�evaluatezExpression.evaluateCs*����d�i�i�.�"�)=�~�g�?V�W�X���
r#N)r�ztypes.CodeTyper:r;)rDr+r:r)r�r�r:rh)	rrrr<r-r6�classmethodr�r�r"r#r$rr*s,���
�I��� �� �
r#)rpr>r:zast.Expression)rpr>r:zast.expr)rpr>r:zast.keyword)rpr>r:zlist[ast.keyword])&r<�
__future__rrk�dataclasses�enumr�rR�types�typingrrrrrr	r
�__all__�Enumr�	dataclassr'�	Exceptionrr>r�rrrmrtrzr�r�r�r�r�r+r�rr"r#r$�<module>r�s���,#�
����	�������������
��	�	�
�����d�#�
�
�$�
�:��:�T
�T
�t��:���A�(!�5�$�?��!�H�U�(�U�
���1�1��1�
$�W�S�"4�4�5�
$� #�#r#

Youez - 2016 - github.com/yon3zu
LinuXploit