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

05d�Q�@s�ddlZddlZddlmZddlmZddlmZddlmZddlmZddlm	Z	ddlm
Z
dd	lmZdd
lmZddlm
Z
ddlmZdd
lmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddl m!Z!ddl"m#Z#ddl$m%Z%dd l&m'Z'dd!l&m(Z(dd"l)m*Z*e�r�dd#l+m,Z,dd$l-m.Z.d%d&�Z/ed'd(d)�Z0Gd*d(�d(�Z1e2ee1e
d+�d,d-�Z3e#Gd.d/�d/e1��Z4e#Gd0d1�d1e1��Z5Gd2d3�d3e�Z6ee5e4feee2efd4�d5d6�Z7ee2efeee5e4fd7�d8d9�Z8e1ee2efd4�d:d;�Z9ee2efee2efd<�d=d>�Z:dS)?�N)�StringIO)�pprint)�Any)�cast)�Dict)�Iterable)�Iterator)�List)�Mapping)�NoReturn)�Optional)�Tuple)�Type)�
TYPE_CHECKING)�TypeVar)�Union)�ExceptionChainRepr)�
ExceptionInfo)�
ExceptionRepr)�	ReprEntry)�ReprEntryNative)�ReprExceptionInfo��ReprFileLocation)�ReprFuncArgs)�
ReprLocals��
ReprTraceback)�TerminalRepr)�TerminalWriter)�final)�Config)�	Collector)�Item)�skip)�Literal)�CallInfoc
Cs`z|jWStyZ|j}d|ddd�}d�|d|d||d�|_}|YS0dS)Nz%s.%s.%s�version_info�z[{}] {} -- Python {} {}�idZsysplatform�
executable)Z_workerinfocache�AttributeErrorZ
workerinfo�format)�node�dZver�s�r0�3/usr/lib/python3.9/site-packages/_pytest/reports.py�getworkerinfoline,s�
r2�_R�
BaseReport)�boundc@s�eZdZUeeed<eeeeeefed<ede	e
eeeefeefed<eeeefed<eed<ded<e
dd	�d
d�Zer�ee
d�d
d�Zedd�dd�Zeeeeefd�dd�Zeed�dd��Zeed�dd��Zeed�dd��Zeed�dd��Zeed�dd��Zeed�d d!��Zeed�d"d#��Zeed�d$d%��Zeed�d&d'��Zeeed�d(d)��Z e!d*�d+d,�Z"e#ee
fd�d-d.�Z$e%e&e'e#ee(fe'd/�d0d1��Z)dS)2r4�when�locationN�longrepr�sections�nodeid�&Literal['passed', 'failed', 'skipped']�outcome)�kw�returncKs|j�|�dS�N)�__dict__�update)�selfr=r0r0r1�__init__EszBaseReport.__init__)�keyr>cCsdSr?r0)rBrDr0r0r1�__getattr__JszBaseReport.__getattr__��outr>cCs�t|d�r"t|j�}|r"|�|�|j}|dur4dSt|d�rTtt|�}|�|�n.zt|�}Wnt	yvd}Yn0|�|�dS)Nr-�
toterminalz<unprintable longrepr>)
�hasattrr2r-�liner8rrrH�str�UnicodeEncodeError)rBrGZworker_infor8Zlongrepr_terminalr/r0r0r1rHMs





zBaseReport.toterminal)�prefixr>ccs(|jD]\}}|�|�r||fVqdSr?)r9�
startswith)rBrM�name�contentr0r0r1�get_sectionsas
zBaseReport.get_sections�r>cCs.t�}t|�}d|_|�|�|��}|��S)zRead-only property that returns the full string representation of
        ``longrepr``.

        .. versionadded:: 3.0
        F)rrZ	hasmarkuprH�getvalue�strip)rB�fileZtw�excr0r0r1�longreprtextfs
zBaseReport.longreprtextcCsd�dd�|�d�D��S)z_Return captured log lines, if log capturing is enabled.

        .. versionadded:: 3.5
        �
css|]\}}|VqdSr?r0��.0rMrPr0r0r1�	<genexpr>zsz$BaseReport.caplog.<locals>.<genexpr>zCaptured log��joinrQ�rBr0r0r1�caplogts
�zBaseReport.caplogcCsd�dd�|�d�D��S)zbReturn captured text from stdout, if capturing is enabled.

        .. versionadded:: 3.0
        �css|]\}}|VqdSr?r0rYr0r0r1r[�sz'BaseReport.capstdout.<locals>.<genexpr>zCaptured stdoutr\r^r0r0r1�	capstdout~s
�zBaseReport.capstdoutcCsd�dd�|�d�D��S)zbReturn captured text from stderr, if capturing is enabled.

        .. versionadded:: 3.0
        r`css|]\}}|VqdSr?r0rYr0r0r1r[�sz'BaseReport.capstderr.<locals>.<genexpr>zCaptured stderrr\r^r0r0r1�	capstderr�s
�zBaseReport.capstderrcCs
|jdkS)zWhether the outcome is passed.�passed�r<r^r0r0r1rc�szBaseReport.passedcCs
|jdkS)zWhether the outcome is failed.�failedrdr^r0r0r1re�szBaseReport.failedcCs
|jdkS)zWhether the outcome is skipped.�skippedrdr^r0r0r1rf�szBaseReport.skippedcCs|j�d�dS)z3The path portion of the reported node, as a string.z::r)r:�splitr^r0r0r1�fspath�szBaseReport.fspathcCsdS)a6**Experimental** Whether this report should be counted towards the
        totals shown at the end of the test session: "1 passed, 1 failure, etc".

        .. note::

            This function is considered **experimental**, so beware that it is subject to changes
            even in patch releases.
        Tr0r^r0r0r1�count_towards_summary�s
z BaseReport.count_towards_summarycCs|jdur|j\}}}|SdS)a�**Experimental** The head line shown with longrepr output for this
        report, more commonly during traceback representation during
        failures::

            ________ Test.foo ________


        In the example above, the head_line is "Test.foo".

        .. note::

            This function is considered **experimental**, so beware that it is subject to changes
            even in patch releases.
        N)r7)rBrh�lineno�domainr0r0r1�	head_line�s
zBaseReport.head_line)�configcCs|jj||d�\}}}|S)N)�reportrm)�hookZpytest_report_teststatus)rBrmZ	_categoryZ_short�verboser0r0r1�_get_verbose_word�s�zBaseReport._get_verbose_wordcCst|�S)z�Return the contents of this report as a dict of builtin entries,
        suitable for serialization.

        This was originally the serialize_report() function from xdist (ca03269).

        Experimental method.
        )�_report_to_jsonr^r0r0r1�_to_json�szBaseReport._to_json)�cls�
reportdictr>cCst|�}|fi|��S)aCreate either a TestReport or CollectReport, depending on the calling class.

        It is the callers responsibility to know which class to pass here.

        This was originally the serialize_report() function from xdist (ca03269).

        Experimental method.
        )�_report_kwargs_from_json)rtru�kwargsr0r0r1�
_from_json�s
zBaseReport._from_json)*�__name__�
__module__�__qualname__rrK�__annotations__r
�intrr�
BaseExceptionrr	rrCrrErrHrrQ�propertyrWr_rarb�boolrcrerfrhrirlr!rqrrs�classmethodrr3�objectrxr0r0r0r1r4;sJ
�
			
)�	type_name�report_classr>cCsnd}t�}td|d�td||d�td||d�t||d�td||d�td|d�t|����dS)Nz+https://github.com/pytest-dev/pytest/issueszd----------------------------------------------------------------------------------------------------)�streamz.INTERNALERROR: Unknown entry type returned: %szreport_name: %szPlease report this bug at %s)rr�RuntimeErrorrS)r�r�ru�urlr�r0r0r1�_report_unserialization_failure�sr�c@s�eZdZdZdZdeeeeeefe	ee
fdedee
eeeefeefdeeeefeeeeeeeefdd�d	d
�Zed�dd
�Zeeddd�dd��ZdS)�
TestReportz�Basic test report object (also used for setup and teardown calls if
    they fail).

    Reports can contain arbitrary extra attributes.
    Fr0rNr;z$Literal['setup', 'call', 'teardown'])r:r7�keywordsr<r8r6r9�duration�start�stop�user_propertiesr>c
Ks^||_||_||_||_||_||_t|p,g�|_t|�|_||_	|	|_
|
|_|j�
|�dSr?)r:r7r�r<r8r6�listr�r9r�r�r�r@rA)
rBr:r7r�r<r8r6r9r�r�r�r��extrar0r0r1rC�s
zTestReport.__init__rRcCsd�|jj|j|j|j�S)Nz <{} {!r} when={!r} outcome={!r}>)r,�	__class__ryr:r6r<r^r0r0r1�__repr__9s�zTestReport.__repr__zCallInfo[None])�item�callr>c
Csf|j}|dksJ�|j}|j}|j}dd�|jD�}|j}g}	|jsNd}
d}n�t|t�sbd}
|}n�t|jt	j
�r�d}
|��}|dur�td��|jj
r�|��dd	�\}
}|dus�J�t�|
�|d
|jf}nt|j�|j|jf}n2d}
|jdkr�|�|�}n|j||j�dd
�d�}|jD]&\}}}|	�d|�d|��|f��q||j|j||
|||	||||jd�S)z�Create and fill a TestReport with standard item and call info.

        :param item: The item.
        :param call: The call info.
        �collectcSsi|]
}|d�qS)�r0�rZ�xr0r0r1�
<dictcomp>K�z1TestReport.from_item_and_call.<locals>.<dictcomp>rcNrerfz=There should always be a traceback entry for skipping a test.�r�r�Ztbstyle�auto)�stylez	Captured � )r�)r6r�r�r�r��excinfo�
isinstancer�valuer$�	ExceptionZ
_getreprcrash�
ValueErrorZ_use_item_locationZ
reportinfo�osrh�messagerK�pathrjZrepr_failureZ_repr_failure_pyrmZ	getoptionZ_report_sections�appendr:r7r�)rtr�r�r6r�r�r�r�r�r9r<r8�rr�rJZrwhenrDrPr0r0r1�from_item_and_call>s`�
�
��zTestReport.from_item_and_call)r0rrrN)ryrzr{�__doc__Z__test__rKr
rr}r
rrrr~rr�floatr�rCr�r�r#r�r0r0r0r1r��s4�
��<r�c
@s�eZdZdZdZdededeee	ee
efeefee
eeefee	eefdd�dd�Zeee	eee
efd	�d
d��Zed	�dd
�ZdS)�
CollectReportzSCollection report object.

    Reports can contain arbitrary extra attributes.
    r�r0r;N)r:r<r8�resultr9r>cKs6||_||_||_|pg|_t|�|_|j�|�dSr?)r:r<r8r�r�r9r@rA)rBr:r<r8r�r9r�r0r0r1rC�s

zCollectReport.__init__rRcCs|jd|jfSr?)rhr^r0r0r1r7�szCollectReport.locationcCsd�|jt|j�|j�S)Nz.<CollectReport {!r} lenresult={} outcome={!r}>)r,r:�lenr�r<r^r0r0r1r��s�zCollectReport.__repr__)r0)ryrzr{r�r6rKrrr~r
r}rrr	r#r"rrCrr7r�r0r0r0r1r��s"
����r�c@s,eZdZedd�dd�Zedd�dd�ZdS)�CollectErrorReprN)�msgr>cCs
||_dSr?)r8)rBr�r0r0r1rC�szCollectErrorRepr.__init__rFcCs|j|jdd�dS)NT)Zred)rJr8)rBrGr0r0r1rH�szCollectErrorRepr.toterminal)ryrzr{rKrCrrHr0r0r0r1r��sr�)rnr>cCs*t|ttf�r&|��}|jj|d<|SdS)N�$report_type)r�r�r�rsr�ry)rn�datar0r0r1�pytest_report_to_serializable�s
r�)r�r>cCsNd|vrJ|ddkrt�|�S|ddkr4t�|�SdsJJd�|d���dS)Nr�r�r�Fz(Unknown report_type unserialize data: {})r�rxr�r,)r�r0r0r1�pytest_report_from_serializable�s


�r�cstttftttfd�dd��ttttfd��fdd��ttttttfd�dd	��t	tttfd
���fdd�}|j
��}t|j
d
�r�t|j
d�r�t|j
d�r�||�|d<q�t|j
�|d<n
|j
|d<|D]8}t||tj�r�t�||�||<q�|dkr�d||<q�|S)z�Return the contents of this report as a dict of builtin entries,
    suitable for serialization.

    This was originally the serialize_report() function from xdist (ca03269).
    )�entryr>cSsHt�|�}|��D] \}}t|d�rt�|�||<qt|�j|d�}|S)Nr@)�typer�)�dataclasses�asdict�itemsrIr�ry)r�r�rDr��
entry_datar0r0r1�serialize_repr_entry�s

z-_report_to_json.<locals>.serialize_repr_entry)�
reprtracebackr>cs&t�|�}�fdd�|jD�|d<|S)Ncsg|]}�|��qSr0r0r��r�r0r1�
<listcomp>�szE_report_to_json.<locals>.serialize_repr_traceback.<locals>.<listcomp>�reprentries)r�r�r�)r�r�r�r0r1�serialize_repr_traceback�s


�
z1_report_to_json.<locals>.serialize_repr_traceback)�	reprcrashr>cSs|durt�|�SdSdSr?)r�r�)r�r0r0r1�serialize_repr_crash�s
z-_report_to_json.<locals>.serialize_repr_crash)�repr>cs�|jdusJ�tt|j�}�|j��|j�|jd�}t|t�rvg|d<|jD]&\}}}|d�	�|��|�|f�qLnd|d<|S)N)r�r�r9�chain)
r8rrr�r�r9r�rr�r�)r�r8r�Zrepr_tracebackZ
repr_crash�description)r�r�r0r1�serialize_exception_longrepr�s"�
��z5_report_to_json.<locals>.serialize_exception_longreprrHr�r�r8r�N)rrrrrKrrrrr4r@�copyrIr8r�r��PathLikerh)rnr�r.rOr0)r�r�r�r1rr�s,

�
�
�

rr)rur>cs��fdd���fdd�}ttttfd�dd�}�dr�d	�dvr�d
�dvr�|�dd
�}|�dd	�}�ddr�g}�ddD]"\}}}|�||�||�|f�q�t|�}	nt||d�}	�dd
D]}
|	j|
�q�|	�d<�S)z�Return **kwargs that can be used to construct a TestReport or
    CollectReport instance.

    This was originally the serialize_report() function from xdist (ca03269).
    cs�|d}|d}|dkr�d}d}d}|dr>tfi|d��}|drXtfi|d��}|drpt|dd�}t|d||||dd	�}n"|d
kr�t|d�}nt|t��|S)Nr�r�r�reprfuncargs�reprfileloc�
reprlocals�linesr�)r�r�r�r�r�r)rrrrrr�r�)r�r�Z
entry_typer�r�r�Z	reprentry)rur0r1�deserialize_repr_entry&s.�z8_report_kwargs_from_json.<locals>.deserialize_repr_entrycs(�fdd�|dD�|d<tfi|��S)Ncsg|]}�|��qSr0r0r��r�r0r1r�BszP_report_kwargs_from_json.<locals>.deserialize_repr_traceback.<locals>.<listcomp>r�r)Zrepr_traceback_dictr�r0r1�deserialize_repr_tracebackAs
�
z<_report_kwargs_from_json.<locals>.deserialize_repr_traceback�Zrepr_crash_dictcSs|durtfi|��SdSdSr?rr�r0r0r1�deserialize_repr_crashGsz8_report_kwargs_from_json.<locals>.deserialize_repr_crashr8r�r�r�)r�r�r9)rrrKrr�rrZ
addsection)rur�r�r�r�r�Zrepr_traceback_dataZrepr_crash_datar�Zexception_info�sectionr0)r�rur1rvsH�
�
�
�����	��rv);r�r��iorr�typingrrrrrr	r
rrr
rrrrZ_pytest._code.coderrrrrrrrrrrZ_pytest._iorZ_pytest.compatr Z_pytest.configr!Z
_pytest.nodesr"r#Z_pytest.outcomesr$Ztyping_extensionsr%Z_pytest.runnerr&r2r3r4rKr�r�r�r�r�r�rrrvr0r0r0r1�<module>st,�3	
�
�I

Youez - 2016 - github.com/yon3zu
LinuXploit