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__/expression.cpython-39.pyc
a

05d��@s<dZddlZddlZddlZddlZddlZddlmZddlmZddlm	Z	ddlm
Z
ddlmZddlmZd	d
gZ
Gdd�dej�Zejd
d�Gdd�d��ZGdd
�d
e�ZGdd�d�ZdZeejd�dd�Zeejd�dd�Zeejd�dd�Zeejd�dd�ZGdd�de	eef�ZGd d	�d	�ZdS)!a�Evaluate 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
ident:      (\w|:|\+|-|\.|\[|\]|\\|/)+

The semantics are:

- Empty expression evaluates to False.
- ident evaluates to True of False according to a provided matcher function.
- or/and/not evaluate according to the usual boolean semantics.
�N)�Callable)�Iterator)�Mapping)�NoReturn)�Optional)�Sequence�
Expression�
ParseErrorc@s(eZdZdZdZdZdZdZdZdZ	dS)	�	TokenTypezleft parenthesiszright parenthesis�or�and�notZ
identifierzend of inputN)
�__name__�
__module__�__qualname__�LPAREN�RPAREN�OR�AND�NOT�IDENT�EOF�rr�;/usr/lib/python3.9/site-packages/_pytest/mark/expression.pyr
$sr
T)�frozenc@s*eZdZUdZeed<eed<eed<dS)�Token)�type�value�posrrrN)rrr�	__slots__r
�__annotations__�str�intrrrrr.s
rc@s0eZdZdZeedd�dd�Zed�dd�ZdS)	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.
    N)�column�message�returncCs||_||_dS�N�r#r$)�selfr#r$rrr�__init__=szParseError.__init__�r%cCsd|j�d|j��S)Nz
at column z: r'�r(rrr�__str__AszParseError.__str__)rrr�__doc__r"r!r)r,rrrrr	6sc@sdeZdZdZedd�dd�Zeeed�dd�Zdd	�e	e
eed
�dd�Ze
e	ed
�dd�ZdS)�Scanner)�tokens�currentN��inputr%cCs|�|�|_t|j�|_dSr&)�lexr/�nextr0)r(r2rrrr)HszScanner.__init__ccs4d}|t|�k�r ||dvr(|d7}q||dkrNttjd|�V|d7}q||dkrtttjd|�V|d7}qt�d||d��}|�r|�d�}|dkr�ttj||�VnD|dkr�ttj	||�Vn*|d	kr�ttj
||�Vnttj||�V|t|�7}qt|dd
||�d���qttj
d|�VdS)
Nr)� �	��(�)z(:?\w|:|\+|-|\.|\[|\]|\\|/)+rrr
zunexpected character "�"�)�lenrr
rr�re�match�grouprrrrr	r)r(r2rr>rrrrr3Ls4



�zScanner.lexF��reject)rrAr%cCsB|jj|ur.|j}|jtjur*t|j�|_|S|r>|�|f�dSr&)r0rr
rr4r/rA)r(rrA�tokenrrr�acceptkszScanner.accept)�expectedr%cCs4t|jjdd�d�dd�|D��|jjj���dS)Nr7zexpected {}; got {}z OR css|]}|jVqdSr&)r)�.0rrrr�	<genexpr>y�z!Scanner.reject.<locals>.<genexpr>)r	r0r�format�joinrr)r(rDrrrrAus
��zScanner.reject)rrrrr!r)rrr3r
�boolrrCrrrArrrrr.Es

r.�$)�sr%cCs@|�tj�rt�d�}nt|�}|jtjdd�t�t�|��S)NFTr@)rCr
r�astZNameConstant�exprZfix_missing_locationsr)rL�retrrr�
expression�s
rPcCs6t|�}|�tj�r2t|�}t�t��||g�}q|Sr&)�and_exprrCr
rrM�BoolOpZOr�rLrOZrhsrrrrN�s
rNcCs6t|�}|�tj�r2t|�}t�t��||g�}q|Sr&)�not_exprrCr
rrMrRZAndrSrrrrQ�s
rQcCs�|�tj�r t�t��t|��S|�tj�rHt|�}|jtj	dd�|S|�tj
�}|rnt�t|j
t���S|�tjtjtj
f�dS)NTr@)rCr
rrMZUnaryOpZNotrTrrNrr�Name�IDENT_PREFIXrZLoadrA)rLrO�identrrrrT�srTc@sZeZdZdZeegefdd�dd�Zeed�dd�Ze	ed	�d
d�Z
ed	�dd
�ZdS)�MatcherAdapterzDAdapts a matcher function to a locals mapping as required by eval().N��matcherr%cCs
||_dSr&)rZ)r(rZrrrr)�szMatcherAdapter.__init__)�keyr%cCs|�|tt�d��Sr&)rZr<rV)r(r[rrr�__getitem__�szMatcherAdapter.__getitem__r*cCs
t��dSr&��NotImplementedErrorr+rrr�__iter__�szMatcherAdapter.__iter__cCs
t��dSr&r]r+rrr�__len__�szMatcherAdapter.__len__)
rrrr-rr!rJr)r\rr_r"r`rrrrrX�s
rXc@sTeZdZdZdZejdd�dd�Zee	dd�dd	��Z
ee	gefed
�dd�Z
dS)
rzwA compiled match expression as used by -k and -m.

    The expression can be evaluated against different matchers.
    ��codeN)rbr%cCs
||_dSr&ra)r(rbrrrr)�szExpression.__init__r1cCs"tt|��}t|ddd�}t|�S)z\Compile a match expression.

        :param input: The input expression - one line.
        z<pytest match expression>�eval)�filename�mode)rPr.�compiler)r(r2Zastexprrbrrrrf�s�zExpression.compilerYcCst|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__)rcrbrX)r(rZrOrrr�evaluate�s	zExpression.evaluate)rrrr-r�types�CodeTyper)�classmethodr!rfrrJrhrrrrr�s
)r-rMZdataclasses�enumr=ri�typingrrrrrr�__all__�Enumr
Z	dataclassr�	Exceptionr	r.rVrrPrNrQrTr!rJrXrrrr�<module>s4�

=	


Youez - 2016 - github.com/yon3zu
LinuXploit