????

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__/warnings.cpython-311.pyc

�

�܋f��
��ddlZddlZddlmZddlmZddlmZddlmZddlZddl	m
Z
ddl	mZddl	mZdd	l
mZdd
lmZddlmZerddlmZd
eddfd�Zed
edddeededfd���Zdejdefd�Zejdd���dededfd���Zejdd���dededfd���Zejd���dededfd���Zejd���dededfd���Zejd���d d!dedfd"���ZdS)#�N)�contextmanager)�	Generator)�Optional)�
TYPE_CHECKING)�apply_warning_filters)�Config)�parse_warning_filter)�Session)�Item)�TerminalReporter)�Literal�config�returnc�2�|�dd��dS)N�markersz�filterwarnings(warning): add a warning filter to the given test. see https://docs.pytest.org/en/stable/how-to/capture-warnings.html#pytest-mark-filterwarnings )�addinivalue_line)rs �a/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/_pytest/warnings.py�pytest_configurers-��
����	i�������whenz'Literal['config', 'collect', 'runtest']�item)NNNc
#�^K�|�d��}|jjpg}tjd���5}|�J�t
js6tjdt���tjdt���t||��|�dn|j}|�@|�d���D])}|j
D]}	tjt|	d	�
���� �*dV�|D].}
|j�t#|
||d�������/	ddd��dS#1swxYwYdS)
z�Context manager that catches warnings generated in the contained execution block.

    ``item`` can be None if we are not in the context of an item execution.

    Each warning captured triggers the ``pytest_warning_recorded`` hook.
    �filterwarningsT)�recordN�always)�category�)�nameF)�escape)�warning_message�nodeidr�location)�kwargs)�getini�known_args_namespace�pythonwarnings�warnings�catch_warnings�sys�warnoptionsr�DeprecationWarning�PendingDeprecationWarningrr!�iter_markers�argsr	�pytest_warning_recorded�
call_historic�dict)r�ihookrr�config_filters�cmdline_filters�logr!�mark�argr s           r�catch_warnings_for_itemr8s������]�]�#3�4�4�N��1�@�F�B�O�	�	 ��	-�	-�	-���������	R��#�H�7I�J�J�J�J��#�H�7P�Q�Q�Q�Q��n�o�>�>�>��|���������)�)�/?�)�@�@�
V�
V���9�V�V�C��+�-A�#�e�-T�-T�-T�U�U�U�V�	����"�	�	�O��)�7�7��$3�!��!�	���
8�
�
�
�
�	�)��������������������s�CD"�"D&�)D&r c�x�|j}tjt|��|j|j|j|j��}|j�r	ddl	}|�
|j��}|�0d�|�����}|d|��z
}n!d}|dz
}|d|�d�z
}n#t$rYnwxYw|S)	z.Convert a warnings.WarningMessage to a string.Nr�
z
Object allocated at:
zPhttps://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warningszDEnable tracemalloc to get traceback where the object was allocated.
zSee z for more info.)�messager'�
formatwarning�strr�filename�lineno�line�source�tracemalloc�get_object_traceback�join�format�ImportError)r �warn_msg�msgrB�tb�formatted_tb�urls       r�warning_record_to_strrLJs����&�H�
�
 ��H�
�
�� �� �������C���)�	3������1�1�/�2H�I�I�B��~�#�y�y������5�5���@�,�@�@�@���i���^�^���2�c�2�2�2�2�����	�	�	��D�	�����Js�	B*�*
B7�6B7T)�hookwrapper�tryfirstc#�~K�t|j|jd|���5dV�ddd��dS#1swxYwYdS)N�runtest�rr2rr)r8rr2)rs r�pytest_runtest_protocolrRhs�����	 ��{�$�*�9�4�
�
�
���	������������������������s�2�6�6�sessionc#�K�|j}t||jdd���5dV�ddd��dS#1swxYwYdS)N�collectrQ�rr8�hook�rSrs  r�pytest_collectionrYps�����
�^�F�	 ��V�[�y�t�
�
�
���	��������������������������4�8�8)rM�terminalreporterc#�K�|j}t||jdd���5dV�ddd��dS#1swxYwYdS�NrrQrV)r[rs  r�pytest_terminal_summaryr^ys������
$�F�	 ��V�[�x�d�
�
�
���	������������������������rZc#�K�|j}t||jdd���5dV�ddd��dS#1swxYwYdSr]rVrXs  r�pytest_sessionfinishr`�s�����
�^�F�	 ��V�[�x�d�
�
�
���	������������������������rZ�early_configrc#�tK�t||jdd���5dV�ddd��dS#1swxYwYdSr])r8rW)ras r�pytest_load_initial_conftestsrc�s�����
!��<�#4�8�$�
�
�
���	������������������������s�-�1�1) r)r'�
contextlibr�typingrrr�pytest�_pytest.configrrr	�_pytest.mainr
�
_pytest.nodesr�_pytest.terminalr�typing_extensionsr
rr8�WarningMessager=rL�hookimplrRrYr^r`rc�rr�<module>ros���
�
�
�
�����%�%�%�%�%�%������������� � � � � � �
�
�
�
�0�0�0�0�0�0�!�!�!�!�!�!�/�/�/�/�/�/� � � � � � �������-�-�-�-�-�-��*�)�)�)�)�)�)��V��������*��*�4�*��4�.�	*�
�� �*�*�*���*�Z�8�+B��s�����<���T�D�1�1�1��$��9�5E�+F����2�1�����T�D�1�1�1��w��9�5E�+F����2�1�����T�"�"�"��&���� ����#�"�����T�"�"�"��'��i�8H�.I����#�"�����T�"�"�"������ ����#�"���r