????

Your IP : 3.147.70.194


Current Path : /opt/cloudlinux/venv/lib/python3.11/site-packages/_pytest/__pycache__/
Upload File :
Current File : //opt/cloudlinux/venv/lib/python3.11/site-packages/_pytest/__pycache__/skipping.cpython-311.pyc

�

�܋f�'�
��dZddlZddlZddlZddlZddlZddlmZddlm	Z	ddlm
Z
ddlmZddlmZddl
mZdd	l
mZdd
lmZddlmZddlmZdd
lmZddlmZddlmZddlmZddlmZddlmZdeddfd�Z deddfd�Z!dedede"dee#e$ffd�Z%ej&d���Gd�d����Z'dede
e'fd �Z(ej&d���Gd!�d"����Z)dede
e)fd#�Z*ee
e)��Z+ed�$��deddfd%���Z,ed�&��dede	d'fd(���Z-ed�&��ded)edfd*���Z.d+ede
ee$e$e$ffd,�Z/dS)-z-Support for skip/xfail functions and markers.�N)�Mapping)�	Generator)�Optional)�Tuple)�Type)�Config)�hookimpl)�Parser)�Mark)�Item)�fail)�skip)�xfail)�
BaseReport)�CallInfo)�StashKey�parser�returnc��|�d��}|�ddddd���|�dd	dd
���dS)N�generalz
--runxfail�
store_true�runxfailFz<Report the results of xfail tests as if they were not marked)�action�dest�default�help�xfail_strictz\Default for the strict parameter of xfail markers when not given explicitly (default: False)�bool)r�type)�getgroup�	addoption�addini)r�groups  �a/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/_pytest/skipping.py�pytest_addoptionr%sr���O�O�I�&�&�E�	�O�O���
��
K������M�M��	=��
��������configc�8���|jjrIddl��j�|���fd���d�}tj|_t
�d|��|�dd��|�dd��|�dd��dS)	Nrc�&��t�d���S)Nr)�setattr)�old�pytests��r$�<lambda>z"pytest_configure.<locals>.<lambda>3s���7�6�7�C�#@�#@�r&c��dS)N�)�args�kwargss  r$�nopzpytest_configure.<locals>.nop5s���Dr&r�markersz�skip(reason=None): skip the given test function with an optional reason. Example: skip(reason="no way of currently testing this") skips the test.askipif(condition, ..., *, reason=...): skip the given test function if any of the conditions evaluate to True. Example: skipif(sys.platform == 'win32') skips the test if we are on the win32 platform. See https://docs.pytest.org/en/stable/reference/reference.html#pytest-mark-skipifaxfail(condition, ..., *, reason=..., run=True, raises=None, strict=xfail_strict): mark the test function as an expected failure if any of the conditions evaluate to True. Optionally specify a reason for better reporting and run=False if you don't even want to execute the test function. If only specific exception(s) are expected, you can list them in raises, and if the test fails in other ways, it will be reported as a true failure. See https://docs.pytest.org/en/stable/reference/reference.html#pytest-mark-xfail)�optionrr,r�add_cleanup�	Exceptionr*�addinivalue_line)r'r2r+r,s  @@r$�pytest_configurer8-s�����
�}��&��
�
�
��l�����@�@�@�@�@�A�A�A�	�	�	����
�����%�%�%�
����	��������	\��������	k�	�	�	�	�	r&�item�mark�	conditionc�D�t|t���r�ttt|jd�}t
|j�|j�����D]N}t|t��s"td�|�����|�|���Ot|d��r|�|jj��	d|j�d�}t#||d��}t%||��}�n<#t&$rO}d|jzd	|zd	d
|jpdzzdzd
g}	t+d�|	��d���Yd}~n�d}~wt.$r_}d|jzd	|zgt1jt5|��|���}	t+d�|	��d���Yd}~n�d}~wwxYw	t7|��}nh#t.$r[}d|jzgt1jt5|��|���}	t+d�|	��d���Yd}~nd}~wwxYw|j�dd��}
|
�9t|t��rd|z}
nd|jzdz}t+|d���||
fS)a.Evaluate a single skipif/xfail condition.

    If an old-style string condition is given, it is eval()'d, otherwise the
    condition is bool()'d. If this fails, an appropriately formatted pytest.fail
    is raised.

    Returns (result, reason). The reason is only relevant if the result is True.
    )�os�sys�platformr')r'z<pytest_markeval_namespace() needs to return a dict, got {!r}�obj�<z condition>�evalzError evaluating %r conditionz    � r�^zSyntaxError: invalid syntax�
F)�pytraceNz*Error evaluating %r condition as a boolean�reasonzcondition: zError evaluating %r: zDyou need to specify reason=STRING when using booleans as conditions.)�
isinstance�strr=r>r?r'�reversed�ihook�pytest_markeval_namespacer�
ValueError�format�update�hasattrr@�__globals__�name�compilerB�SyntaxError�offsetr
�joinr6�	traceback�format_exception_onlyrrr1�get)r9r:r;�globals_�
dictionary�filename�condition_code�result�exc�msglinesrG�msgs            r$�evaluate_conditionrbTs���)�S�!�!�05��� ��k�	
�
��#��J�0�0���0�D�D�
�
�		(�		(�J��j�'�2�2�
� �R�Y�Y�"������

�O�O�J�'�'�'�'��4����	2��O�O�D�H�0�1�1�1�	5�1�4�9�1�1�1�H�$�Y��&�A�A�N��.�(�3�3�F�F���	5�	5�	5�/�$�)�;���"����
��a�0�0�3�6�-�	�H�
����8�$�$�e�4�4�4�4�4�4�4�4�4������	5�	5�	5�/�$�)�;���"���0��c���C�@�@��H�

����8�$�$�e�4�4�4�4�4�4�4�4�4�����
	5����	5��)�_�_�F�F���	5�	5�	5�<�t�y�H���0��c���C�@�@��H�
����8�$�$�e�4�4�4�4�4�4�4�4�4�����	5�����[�_�_�X�t�
,�
,�F�
�~��i��%�%�	%�"�Y�.�F�F�(�$�)�3�X�Y�
�
��e�$�$�$�$��6�>�s?�,D�
G�AE � 
G�-AG�G�G � 
I�*AI�IT)�frozenc�"�eZdZUdZdZeed<dS)�Skipz$The result of evaluate_skip_marks().zunconditional skiprGN)�__name__�
__module__�__qualname__�__doc__rGrI�__annotations__r/r&r$rere�s(�������.�.�&�F�C�&�&�&�&�&r&rec���|�d���D]}}d|jvr|j}n|jdf}|s,|j�dd��}t	|��cS|D]+}t|||��\}}|rt	|��ccS�,�~|�d���D]L}	t	|ji|j��cS#t$r%}t
t|��dz��d�d}~wwxYwdS)	zDEvaluate skip and skipif marks on item, returning Skip if triggered.�skipif�rRr;rG�rz& - maybe you meant pytest.mark.skipif?N)�iter_markersr1r0rYrerb�	TypeErrorrI)r9r:�
conditionsrGr;r^�es       r$�evaluate_skip_marksrs�sV���!�!�x�!�0�0�$�$���d�k�)�)���J�J��+�k�2�4�J��	 ��[�_�_�X�r�2�2�F���<�<����$�	$�	$�I�/��d�I�F�F�N�F�F��
$��F�|�|�#�#�#�#�#�
$�	$�
�!�!�v�!�.�.�Y�Y��	Y����2�d�k�2�2�2�2�2���	Y�	Y�	Y��C��F�F�%M�M�N�N�TX�X�����	Y�����4s�.C�
C5� C0�0C5c�h�eZdZUdZdZeed<eed<eed<ee	e
edfed<dS)	�Xfailz%The result of evaluate_xfail_marks().)rG�run�strict�raisesrGrvrw.rxN)rfrgrhri�	__slots__rIrjrrrr�
BaseExceptionr/r&r$ruru�sX�������/�/�5�I��K�K�K�	
�I�I�I��L�L�L��U�4�
�.��3�4�5�5�5�5�5�5r&ruc��|�d���D]�}|j�dd��}|j�d|j�d����}|j�dd��}d	|jvr|j}n|jd	f}|s/|j�d
d��}t
||||��cS|D].}t|||��\}}|rt
||||��ccS�/��dS)z;Evaluate xfail marks on item, returning Xfail if triggered.rrmrvTrwrrxNr;rGrn)ror1rYr'�getinir0rurb)	r9r:rvrwrxrqrGr;r^s	         r$�evaluate_xfail_marksr}�s.���!�!�w�!�/�/�:�:���k�o�o�e�T�*�*�������4�;�+=�+=�n�+M�+M�N�N�������4�0�0���d�k�)�)���J�J��+�k�2�4�J��	6��[�_�_�X�r�2�2�F����f�f�5�5�5�5�5�$�	:�	:�I�/��d�I�F�F�N�F�F��
:��V�S�&�&�9�9�9�9�9�9�9�
:�	:�
�4r&)�tryfirstc��t|��}|rtj|jd����t	|��x|jt<}|r1|jjj	s"|j
std|jz��dSdSdSdS)NT)�_use_item_location�	[NOTRUN] )rsrr6rGr}�stash�xfailed_keyr'r4rrvr)r9�skipped�xfaileds   r$�pytest_runtest_setupr��s���!�$�'�'�G��F��n�W�^��E�E�E�E�(<�T�(B�(B�B�D�J�{��g��,�t�{�)�2�,�7�;�,�
�k�G�N�*�+�+�+�+�+�,�,�,�,�,�,r&)�hookwrapper)NNNc#�xK�|j�td��}|�t|��x|jt<}|r/|jjjs|jstd|j	z��dV�|j�td��}|� t|��x|jt<}dSdS)Nr�)
r�rYr�r}r'r4rrvrrG)r9r�s  r$�pytest_runtest_callr��s������j�n�n�[�$�/�/�G���,@��,F�,F�F��
�;��'��,�t�{�)�2�,�7�;�,�
�k�G�N�*�+�+�+�	�E�E�E��j�n�n�[�$�/�/�G���,@��,F�,F�F��
�;��'�'�'��r&�callc#�K�dV�}|���}|j�td��}|jjjrdS|jrYt|jj	tj��r5|jj	j�J�d|jj	jz|_
d|_dS|js�|r�|jrA|j}|�#t|jj	|��s	d|_dSd|_|j|_
dS|jdkr8|jrd|_d|jz|_dSd|_|j|_
dSdSdSdS)Nzreason: r��failedr�z[XPASS(strict)] �passed)�
get_resultr�rYr�r'r4r�excinforH�valuerr6ra�wasxfail�outcomer�rxrG�whenrw�longrepr)r9r�r��repr�rxs      r$�pytest_runtest_makereportr�sZ�����e�e�G�
�
�
�
�
�C��j�n�n�[�$�/�/�G��{��"�.���	
��.�*�T�\�%7���I�I�.��|�!�%�1�1�1�!�D�L�$6�$:�:��������
�[�.�W�.��<�
	.��^�F��!�*�T�\�5G��*P�*P�!�&�����'���&�~�����
�Y�&�
 �
 ��~�
.�&���1�G�N�B�����&���&�~�����.�.�.�.�!�
 r&�reportc�J�t|d��r|jrdS|jrdSdS)Nr�)r��x�XFAIL)�xpassed�X�XPASS)rPr�r�)r�s r$�pytest_report_teststatusr�#s9���v�z�"�"�+��>�	+�*�*�
�]�	+�*�*��4r&)0ri�dataclassesr=r?r>rW�collections.abcr�typingrrrr�_pytest.configrr	�_pytest.config.argparsingr
�_pytest.mark.structuresr�
_pytest.nodesr�_pytest.outcomesr
rr�_pytest.reportsr�_pytest.runnerr�
_pytest.stashrr%r8�objectrrIrb�	dataclassrersrur}r�r�r�r�r�r/r&r$�<module>r�s���3�3�����	�	�	�	�����
�
�
�
�����#�#�#�#�#�#�������������������������!�!�!�!�!�!�#�#�#�#�#�#�,�,�,�,�,�,�(�(�(�(�(�(�������!�!�!�!�!�!�!�!�!�!�!�!�"�"�"�"�"�"�&�&�&�&�&�&�#�#�#�#�#�#�"�"�"�"�"�"��V�������&$�V�$��$�$�$�$�NH�T�H��H�&�H�U�4�QT�9�EU�H�H�H�H�V���d�#�#�#�'�'�'�'�'�'�'�$�#�'��d��x��~�����8���d�#�#�#�6�6�6�6�6�6�6�$�#�6��t���������4(�h�x���'�)�)��
��4����,�t�,��,�,�,���,�
��d����
G�d�
G�y�1A�'B�
G�
G�
G���
G� 
��d����.�D�.����.�.�.���.�6�Z��H�U�3��S�=�=Q�4R������r&