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 :  /Python312/Lib/site-packages/_pytest/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

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

��HgSS��L�ddlmZddlZddlmZddlZddlmZddlmZddlm	Z	ddlm
Z
ddlmZdd	lmZdd
lm
Z
ddlmZddlmZdd
lmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddl m!Z!ddl"m#Z#ddl"m$Z$ddl%m&Z&ddl%m'Z'erdd l(m)Z)dd!l*m+Z+d"�Z,Gd#�d$�Z-						d0d%�Z.e
Gd&�d'e-��Z/e
Gd(�d)e-��Z0Gd*�d+e�Z1				d1d,�Z2				d2d-�Z3d3d.�Z4d4d/�Z5y)5�)�annotationsN)�StringIO)�pprint)�Any)�cast)�final)�Iterable)�Iterator)�Literal)�Mapping)�NoReturn)�Sequence)�
TYPE_CHECKING)�ExceptionChainRepr)�
ExceptionInfo)�
ExceptionRepr)�	ReprEntry)�ReprEntryNative)�ReprExceptionInfo��ReprFileLocation)�ReprFuncArgs)�
ReprLocals��
ReprTraceback)�TerminalRepr)�TerminalWriter)�Config)�	Collector)�Item)�fail)�skip)�Self)�CallInfoc���	|jS#t$rJ|j}dj|ddd�}dj|d|d||d�x|_}|cYSwxYw)Nz{}.{}.{}�version_info�z[{}] {} -- Python {} {}�id�sysplatform�
executable)�_workerinfocache�AttributeError�
workerinfo�format)�node�d�ver�ss    �1C:\Python312\Lib\site-packages\_pytest/reports.py�getworkerinfoliner4,s�����$�$�$�����O�O���j����>�!2�2�A�!6�7��$=�$D�$D�
�d�G�Q�}�%�s�A�l�O�%
�	
������
�s��AA!� A!c�P�eZdZUded<ded<ded<ded<d	ed
<ded<dd
�Zerd d�Zd!d�Zd"d�Ze	d#d��Z
e	d#d��Ze	d#d��Ze	d#d��Z
e	d$d��Ze	d$d��Ze	d$d��Ze	d#d��Ze	d$d��Ze	d%d��Z						d&d�Zd'd�Zed(d��Zy))�
BaseReport�
str | None�when�"tuple[str, int | None, str] | None�location�ONone | ExceptionInfo[BaseException] | tuple[str, int, str] | str | TerminalRepr�longreprzlist[tuple[str, str]]�sections�str�nodeid�&Literal['passed', 'failed', 'skipped']�outcomec�:�|jj|�y�N)�__dict__�update)�self�kws  r3�__init__zBaseReport.__init__Bs���
�
���R� �c��yrC�)rF�keys  r3�__getattr__zBaseReport.__getattr__Gs��rIc�B�t|d�r(t|j�}|r|j|�|j}|�yt|d�r"tt|�}|j|�y	t|�}|j|�y#t$rd}Y�wxYw)Nr/�
toterminalz<unprintable longrepr>)
�hasattrr4r/�liner<rrrOr>�UnicodeEncodeError)rF�out�worker_infor<�longrepr_terminalr2s      r3rOzBaseReport.toterminalIs����4�� �+�D�I�I�6�K������%��=�=������8�\�*� $�\�8� <���(�(��-�
-���M��
�H�H�Q�K��&�
-�,��
-�s�3B�B�Bc#�dK�|jD]\}}|j|�s�||f���y�wrC)r=�
startswith)rF�prefix�name�contents    r3�get_sectionszBaseReport.get_sections]s3����!�]�]�	&�M�D�'����v�&��g�o�%�	&�s�$0�	0c��t�}t|�}d|_|j|�|j	�}|j�S)zRead-only property that returns the full string representation of
        ``longrepr``.

        .. versionadded:: 3.0
        F)rr�	hasmarkuprO�getvalue�strip)rF�file�tw�excs    r3�longreprtextzBaseReport.longreprtextbs?���z��
�D�
!�����������m�m�o���y�y�{�rIc�P�djd�|jd�D��S)z_Return captured log lines, if log capturing is enabled.

        .. versionadded:: 3.5
        �
c3�&K�|]	\}}|���y�wrCrK��.0rXrZs   r3�	<genexpr>z$BaseReport.caplog.<locals>.<genexpr>vs����
�)���G�
���zCaptured log��joinr[�rFs r3�caplogzBaseReport.caplogps-���y�y�
�-1�->�->�~�-N�
�
�	
rIc�P�djd�|jd�D��S)zbReturn captured text from stdout, if capturing is enabled.

        .. versionadded:: 3.0
        �c3�&K�|]	\}}|���y�wrCrKrgs   r3riz'BaseReport.capstdout.<locals>.<genexpr>������
�)���G�
�rjzCaptured stdoutrkrms r3�	capstdoutzBaseReport.capstdoutz�.���w�w�
�-1�->�->�?P�-Q�
�
�	
rIc�P�djd�|jd�D��S)zbReturn captured text from stderr, if capturing is enabled.

        .. versionadded:: 3.0
        rpc3�&K�|]	\}}|���y�wrCrKrgs   r3riz'BaseReport.capstderr.<locals>.<genexpr>�rrrjzCaptured stderrrkrms r3�	capstderrzBaseReport.capstderr�rtrIc� �|jdk(S)zWhether the outcome is passed.�passed�rArms r3ryzBaseReport.passed�����|�|�x�'�'rIc� �|jdk(S)zWhether the outcome is failed.�failedrzrms r3r}zBaseReport.failed�r{rIc� �|jdk(S)zWhether the outcome is skipped.�skippedrzrms r3rzBaseReport.skipped�s���|�|�y�(�(rIc�>�|jjd�dS)z3The path portion of the reported node, as a string.z::r)r?�splitrms r3�fspathzBaseReport.fspath�s���{�{� � ��&�q�)�)rIc��y)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.
        TrKrms r3�count_towards_summaryz BaseReport.count_towards_summary�s��rIc�@�|j�|j\}}}|Sy)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)r:)rFr��lineno�domains    r3�	head_linezBaseReport.head_line�s&�� �=�=�$�%)�]�]�"�F�F�F��M�rIc��|jj||��\}}}t|t�r||fSt|t�r7t|�dk(r)|\}}t|t�rt|t�r||fStd|�d��y)N)�report�config�zSpytest_report_teststatus() hook (from a plugin) returned an invalid verbose value: z8.
Expected either a string or a tuple of (word, markup).)�hook�pytest_report_teststatus�
isinstancer>r�lenrr!)rFr��default_markup�	_category�_short�verbose�word�markups        r3�_get_verbose_word_with_markupz(BaseReport._get_verbose_word_with_markup�s���&,�[�[�%I�%I���&J�&
�"�	�6�7��g�s�#��N�*�*��g�x�(�S��\�Q�->�"�L�D�&��$��$��F�G�)D��V�|�#��
)�)0��4,�
,�	
rIc��t|�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_jsonrms r3�_to_jsonzBaseReport._to_json�s���t�$�$rIc�(�t|�}|di|��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.
        rK)�_report_kwargs_from_json)�cls�
reportdict�kwargss   r3�
_from_jsonzBaseReport._from_json�s��*�*�5���}�V�}�rIN)rGr�return�None)rLr>r�r�rSrr�r�)rXr>r�zIterator[tuple[str, str]]�r�r>)r��bool)r�r7)r�rr�zMapping[str, bool]r�ztuple[str, Mapping[str, bool]])r��dict[str, Any])r�zdict[str, object]r�r#)�__name__�
__module__�__qualname__�__annotations__rHrrMrOr[�propertyrcrnrsrwryr}rr�r�r�r�r��classmethodr�rKrIr3r6r68s>��
��0�0�W��$�#��K�
3�3�!��3��(&�
�����
��
��
��
��
��
��(��(��(��(��)��)��*��*��	��	�����(
��
�.@�
�	'�
�*%��
��
rIr6c��d}t�}td|��td|��|��td|��|��t||��td|��|��td|��t|j���)Nz+https://github.com/pytest-dev/pytest/issueszd----------------------------------------------------------------------------------------------------)�streamz,INTERNALERROR: Unknown entry type returned: z
report_name: zPlease report this bug at )rr�RuntimeErrorr^)�	type_name�report_classr��urlr�s     r3�_report_unserialization_failurer��su��8�C�
�Z�F�
�9�V�$�
�
9�)��E�f�U�
�]�<�.�)�&�9�
�:�f�%�
�
'��u�-�f�=�
�9�V�$�
�v���(�
)�)rIc�|�eZdZUdZdZded<					d																								d
d�Zdd�Zedd��Z	y)
�
TestReportz�Basic test report object (also used for setup and teardown calls if
    they fail).

    Reports can contain arbitrary extra attributes.
    Fr>�wasxfailNc��||_||_||_||_||_||_t
|xsg�|_t
|�|_||_	|	|_
|
|_|jj|�yrC)r?r:�keywordsrAr<r8�list�user_propertiesr=�duration�start�stoprDrE)
rFr?r:r�rAr<r8r=r�r�r�r��extras
             r3rHzTestReport.__init__s���(���6>��
�,4��
����!��
���	� $�O�$9�r�:����X���
� (��
�"��
���	��
�
���U�#rIc	��d|jj�d|j�d|j�d|j�d�	S)N�<� z when=�	 outcome=�>)�	__class__r�r?r8rArms r3�__repr__zTestReport.__repr__Is?���4�>�>�*�*�+�1�T�[�[�O�6�$�)�)��i�X\�Xd�Xd�Wg�gh�i�irIc
��|j}|dk7sJ�|j}|j}|j}|jD�cic]}|d��}}|j
}	g}
|j
sd}d}�n(t
|	t�sd}|	}�nt
|	jtj�r�d}|	j�}
|
�Jd��|	jjr@|j�dd\}}|�J�tj|�|dz|
j f}n}t#|
j$�|
j&|
j f}nPd}|jd	k(r|j)|	�}n-|j+|	|j,j/d
d���}|j0D]\}}}|
j3d
|�d|��|f��!||j4|j6|||||
||||j8��Scc}w)z�Create and fill a TestReport with standard item and call info.

        :param item: The item.
        :param call: The call info.
        �collect�ryNr}rz=There should always be a traceback entry for skipping a test.r��call�tbstyle�auto)�stylez	Captured r�)r�)r8r�r�r�r��excinfor�r�valuer"�	Exception�
_getreprcrash�_use_item_location�
reportinfo�osr��messager>�pathr��repr_failure�_repr_failure_pyr��	getoption�_report_sections�appendr?r:r�)r��itemr�r8r�r�r��xr�r�r=rAr<�rr�rQ�rwhenrLrZs                   r3�from_item_and_callzTestReport.from_item_and_callLs����y�y���y� � � ��=�=���
�
���y�y��"&�-�-�0�Q�A�q�D�0��0��,�,�����|�|�>F�G��

��g�}�5�"��"���G�M�M�4�>�>�:�#���)�)�+���M�S�R�S�!��=�=�3�3�!%���!2�2�A�!6�J�D�$��+�+�+�!�y�y����q��!�)�)�C�H� #�A�F�F��Q�X�X�q�y�y�A�H�"���9�9��&�#�0�0��9�H�#�4�4��t�{�{�'<�'<�Y��'O� 5� �H�$(�#8�#8�	B��E�3���O�O�y���Q�u�g�6��@�A�	B���K�K��M�M��������� �0�0�
�	
��M1s�
G9)rKrrrN)r?r>r:ztuple[str, int | None, str]r�zMapping[str, Any]rAr@r<r;r8z$Literal['setup', 'call', 'teardown']r=�Iterable[tuple[str, str]]r��floatr�r�r�r�r�z#Iterable[tuple[str, object]] | Noner�r�r�)r�r r�zCallInfo[None]r�r�)
r�r�r��__doc__�__test__r�rHr�r�r�rKrIr3r�r��s�����H��M�/1����?C�!<$��<$�.�<$�$�	<$�
8�<$��
<$�3�<$�,�<$��<$��<$��<$� =�!<$�$
�%<$�|j��>
��>
rIr�c�T�eZdZdZdZ	d											dd�Ze		d	d��Zd
d�Zy)�
CollectReportzSCollection report object.

    Reports can contain arbitrary extra attributes.
    r�c��||_||_||_|xsg|_t	|�|_|jj|�yrC)r?rAr<�resultr�r=rDrE)rFr?rAr<r�r=r�s       r3rHzCollectReport.__init__�sI��������!��
��l�����X���
��
�
���U�#rIc�4�|jd|jfSrC)r�rms r3r:zCollectReport.location�s�����T�4�;�;�/�/rIc�h�d|j�dt|j��d|j�d�S)Nz<CollectReport z lenresult=r�r�)r?r�r�rArms r3r�zCollectReport.__repr__�s4�� �����{�3�t�{�{�;K�:L�I�VZ�Vb�Vb�Ue�ef�g�grIN)rK)r?r>rAr@r<r;r�zlist[Item | Collector] | Noner=r�r�r�)r�r9r�)	r�r�r�r�r8rHr�r:r�rKrIr3r�r��su���
�D�/1�$��$�8�$��	$�.�$�,�$�
�$�B�0�	+�0��0�
hrIr�c��eZdZdd�Zdd�Zy)�CollectErrorReprc��||_yrC)r<)rF�msgs  r3rHzCollectErrorRepr.__init__�s	����
rIc�>�|j|jd��y)NT)�red)rQr<)rFrSs  r3rOzCollectErrorRepr.toterminal�s��������D��)rIN)r�r>r�r�r�)r�r�r�rHrOrKrIr3r�r��s���*rIr�c��t|ttf�r+|j�}|jj
|d<|Sy)N�$report_type)r�r�r�r�r�r�)r��datas  r3�pytest_report_to_serializabler��s=���&�:�}�5�6���� ��%�/�/�8�8��^����rIc��d|vrS|ddk(rtj|�S|ddk(rtj|�SJdj|d���y)Nr�r�r�z(Unknown report_type unserialize data: {})r�r�r�r.)r�s r3�pytest_report_from_serializabler��so��������<�/��(�(��.�.�
�.�
!�_�
4� �+�+�D�1�1�	
�@�G�G��� �
�	
�u�rIc�����				dd��d�fd��				d
d��d��fd�}|jj�}t|jd�rQt|jd�r"t|jd�r||�|d<n(t	|j�|d<n|j|d<|D]F}t||tj�rt
j||�||<�<|d	k(s�Bd
||<�H|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).
    c���tj|�}|j�D]*\}}t|d�s�tj|�||<�,t	|�j
|d�}|S)NrD)�typer�)�dataclasses�asdict�itemsrPr�r�)�entryr�rLr��
entry_datas     r3�serialize_repr_entryz-_report_to_json.<locals>.serialize_repr_entry�sg���!�!�%�(���*�*�,�	6�J�C���u�j�)�'�.�.�u�5��S�	�	6�#�5�k�2�2�D�A�
��rI�
reprtracebackc���tj|�}|jD�cgc]
}�|���c}|d<|Scc}w)N�reprentries)r�r�r)r�r�r�r�s   �r3�serialize_repr_tracebackz1_report_to_json.<locals>.serialize_repr_traceback�sE����#�#�M�2��-:�-F�-F�!
�()� ��#�!
��}���
��!
s�<�	reprcrashc�2�|�tj|�SyrC)r�r�)rs r3�serialize_repr_crashz-_report_to_json.<locals>.serialize_repr_crash�s��� ��%�%�i�0�0�rIc�`��|j�J�tt|j�}�|j��|j�|j
d�}t
|t�r?g|d<|jD])\}}}|dj�|��|�|f��+|Sd|d<|S)N)rr�r=�chain)
r<rrrr�r=r�rrr�)�repr<r��repr_traceback�
repr_crash�descriptionrrs      ��r3�serialize_exception_longreprz5_report_to_json.<locals>.serialize_exception_longreprs�����|�|�'�'�'��
�s�|�|�4��-�h�.@�.@�A�5�h�6L�6L�M� �)�)�"
��
�h� 2�3� �F�7�O�;C�>�>�
�7��
�K��w��&�&�0��@�,�Z�8�#���
��
�#�F�7�O��
rIrOr<r�N)r�zReprEntry | ReprEntryNativer�r�)r�rr�r�)rzReprFileLocation | Noner��dict[str, Any] | None)rr6r�r�)	rD�copyrPr<r>r�r��PathLiker�)r�rr0rYrr�rs    @@@r3r�r��s�����*��	����*��	���.	������A��v����-��6�?�?�O�4���O�O�[�:
�9��@�A�j�M�����0�A�j�M�����*�
�����a��g�r�{�{�+��i�i��$��(�A�d�G�
�X�
��A�d�G�	�

�HrIc�n����fd���fd�}d
d�}�dr�d�dvr�d�dvr�|�dd�}|�dd�}�ddr?g}�ddD]&\}}}|j||�||�|f��(t|�}	n
t||��}	�dd	D]}
|	j|
��|	�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).
    c�&��|d}|d}|dk(rZd}d}d}|drtdi|d��}|drtdi|d��}|drt|dd�}t|d||||d�	�}|S|d
k(rt	|d�}|St|t��S)Nr�r�r�reprfuncargs�reprfileloc�
reprlocals�linesr�)rrrrr�rrK)rrrrrr�r�)r�r��
entry_typerrr�	reprentryr�s       �r3�deserialize_repr_entryz8_report_kwargs_from_json.<locals>.deserialize_repr_entry3s�����&�!����'�
���$��L��K��J��N�#�+�C�d�>�.B�C���M�"�.�E��m�1D�E���L�!�'��\�(:�7�(C�D�
�5>��7�m�)�%�'��7�m�6�I���	�,�
,�'��W�
�6�I���
,�J�
�J�O��rIc�\��|dD�cgc]
}�|���c}|d<tdi|��Scc}w)NrrKr)�repr_traceback_dictr�rs  �r3�deserialize_repr_tracebackz<_report_kwargs_from_json.<locals>.deserialize_repr_tracebackNs?���/B�=�/Q�.
�*+�"�1�%�.
��M�*��3�2�3�3��.
s�)c��|�tdi|��Sy)NrKr)�repr_crash_dicts r3�deserialize_repr_crashz8_report_kwargs_from_json.<locals>.deserialize_repr_crashTs���&�#�6�o�6�6�rIr<rr�r)r�rr=)rr
)r�rr�
addsection)r�rrr�rr�repr_traceback_data�repr_crash_datar�exception_info�sectionrs`          @r3r�r�,s$����64��	�:���:�j�1�1��z�*�5�5�2��z�"�?�3�
�
�+�:�j�+A�+�+N�O�	��j�!�'�*��E�EO��F��F�	
�A�#�_�k����2�3F�G�.��?�#���	
�FX��F�N�/�+�#��N�
"�*�-�j�9�	0�G�%�N�%�%�w�/�	0�!/�
�:���rI)r�r>r�ztype[BaseReport]r�r
)r�zCollectReport | TestReportr�r
)r�r�r�z!CollectReport | TestReport | None)r�r6r�r�)r�r�r�r�)6�
__future__rr��iorr�r�typingrrrr	r
rrr
rr�_pytest._code.coderrrrrrrrrrr�_pytest._ior�_pytest.configr�
_pytest.nodesrr �_pytest.outcomesr!r"�typing_extensionsr#�_pytest.runnerr$r4r6r�r�r�r�r�r�r�r�rKrIr3�<module>r.s ��"���	����������� �1�,�,�(�.�0�/�+�)�,�+�&�!�#��!�!��&�'�	�u�u�p*��*�"2�*�
�*��L
��L
��L
�^�0h�J�0h��0h�f*�|�*��&�����
��&��F
�RPrI

Youez - 2016 - github.com/yon3zu
LinuXploit