ok

Mini Shell

Direktori : /opt/alt/python311/lib64/python3.11/unittest/__pycache__/
Upload File :
Current File : //opt/alt/python311/lib64/python3.11/unittest/__pycache__/async_case.cpython-311.opt-1.pyc

�

�fY��N�ddlZddlZddlZddlZddlmZGd�de��ZdS)�N�)�TestCasec���eZdZd�fd�	Zd�Zd�Zd�Zd�Zd�Zd�Z	d	�Z
d
�Zd�Zd�Z
d
�Zd�Zd�fd�	Z�fd�Zd�Z�xZS)�IsolatedAsyncioTestCase�runTestc���t���|��d|_tj��|_dS�N)�super�__init__�_asyncioRunner�contextvars�copy_context�_asyncioTestContext)�self�
methodName�	__class__s  ��:/opt/alt/python311/lib64/python3.11/unittest/async_case.pyrz IsolatedAsyncioTestCase.__init__#s:���
������$�$�$�"���#.�#;�#=�#=�� � � �c��
K�dSr	��rs r�
asyncSetUpz"IsolatedAsyncioTestCase.asyncSetUp(������rc��
K�dSr	rrs r�
asyncTearDownz%IsolatedAsyncioTestCase.asyncTearDown+rrc�(�|j|g|�Ri|��dSr	)�
addCleanup�r�func�args�kwargss    r�addAsyncCleanupz'IsolatedAsyncioTestCase.addAsyncCleanup.s)��	���$�����1�&�1�1�1�1�1rc��K�t|��}	|j}|j}n/#t$r"t	d|j�d|j�d���d�wxYw||���d{V��}|�||ddd��|S)z�Enters the supplied asynchronous context manager.

        If successful, also adds its __aexit__ method as a cleanup
        function and returns the result of the __aenter__ method.
        �'�.zC' object does not support the asynchronous context manager protocolN)�type�
__aenter__�	__aexit__�AttributeError�	TypeError�
__module__�__qualname__r")r�cm�cls�enter�exit�results      r�enterAsyncContextz)IsolatedAsyncioTestCase.enterAsyncContext=s������2�h�h��	'��N�E��=�D�D���	'�	'�	'��U���U�U��1A�U�U�U���"&�
'�	'�����u�R�y�y�����������T�2�t�T�4�8�8�8��
s	�"�,Ac��|j���|j�|j��|�|j��dSr	)r�get_loopr�run�setUp�
_callAsyncrrs r�
_callSetUpz"IsolatedAsyncioTestCase._callSetUpQsL��	
��$�$�&�&�&�� �$�$�T�Z�0�0�0������(�(�(�(�(rc�t�|�|���"tjd|�d�td���dSdS)NzFIt is deprecated to return a value that is not None from a test case (�)�)�
stacklevel)�_callMaybeAsync�warnings�warn�DeprecationWarning)r�methods  r�_callTestMethodz'IsolatedAsyncioTestCase._callTestMethodYsd������'�'�3��M�2�(.�2�2�2�3E�RS�
U�
U�
U�
U�
U�
U�4�3rc�x�|�|j��|j�|j��dSr	)r7rrr5�tearDownrs r�
_callTearDownz%IsolatedAsyncioTestCase._callTearDown^s6������*�+�+�+�� �$�$�T�]�3�3�3�3�3rc�(�|j|g|�Ri|��dSr	)r=)r�functionr r!s    r�_callCleanupz$IsolatedAsyncioTestCase._callCleanupbs+�����X�7��7�7�7��7�7�7�7�7rc�P�|j�||i|��|j���S�N)�context)rr5rrs    rr7z"IsolatedAsyncioTestCase._callAsynces<���"�&�&��D�$�!�&�!�!��,�'�
�
�	
rc��tj|��r'|j�||i|��|j���S|jj|g|�Ri|��SrJ)�inspect�iscoroutinefunctionrr5rrs    rr=z'IsolatedAsyncioTestCase._callMaybeAsyncmsv���&�t�,�,�	G��&�*�*���d�%�f�%�%��0�+���
�
0�4�+�/��F�t�F�F�F�v�F�F�Frc�>�tjd���}||_dS)NT)�debug)�asyncio�Runnerr�r�runners  r�_setupAsyncioRunnerz+IsolatedAsyncioTestCase._setupAsyncioRunnerws"����d�+�+�+��$����rc�<�|j}|���dSr	)r�closerSs  r�_tearDownAsyncioRunnerz.IsolatedAsyncioTestCase._tearDownAsyncioRunner|s���$���������rNc����|���	t���|��|���S#|���wxYwr	)rUr
r5rX)rr1rs  �rr5zIsolatedAsyncioTestCase.run�sZ���� � �"�"�"�	*��7�7�;�;�v�&�&��'�'�)�)�)�)��D�'�'�)�)�)�)���s� A�A"c���|���t�����|���dSr	)rUr
rPrX)rrs �rrPzIsolatedAsyncioTestCase.debug�s>���� � �"�"�"�
���
�
�����#�#�%�%�%�%�%rc�@�|j�|���dSdSr	)rrXrs r�__del__zIsolatedAsyncioTestCase.__del__�s+����*��'�'�)�)�)�)�)�+�*r)rr	)�__name__r+r,rrrr"r2r8rBrErHr7r=rUrXr5rPr\�
__classcell__)rs@rrr	s=�������4>�>�>�>�>�>�

�
�
�
�
�
�
2�
2�
2����()�)�)�U�U�U�
4�4�4�8�8�8�
�
�
�G�G�G�%�%�%�
���*�*�*�*�*�*�&�&�&�&�&�
*�*�*�*�*�*�*rr)rQr
rMr>�caserrrrr�<module>r`s|������������������������E*�E*�E*�E*�E*�h�E*�E*�E*�E*�E*r

Zerion Mini Shell 1.0