����JFIF���������
1#@!#!123s
D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
opt
/
alt
/
python311
/
lib64
/
python3.11
/
unittest
/
__pycache__
/
Filename :
async_case.cpython-311.pyc
back
Copy
� ����!A?hY�����������������������N�����d�dl�Z�d�dlZd�dlZd�dlZddlmZ��G�d��de������������ZdS�)�����N����)�TestCasec���������������������������e�Zd�Zd��fd� Zd��Zd��Zd��Zd��Zd��Zd��Z d ��Z d ��Zd��Zd��Z d ��Zd��Zd��fd� Z��fd�Zd��Z��xZS�)�IsolatedAsyncioTestCase�runTestc������������������������t���������������������������������������������|�������������d�|�_��������t����������j����������������������|�_��������d�S��N)�super�__init__�_asyncioRunner�contextvars�copy_context�_asyncioTestContext)�self� methodName� __class__s��� ��:/opt/alt/python311/lib64/python3.11/unittest/async_case.pyr���z IsolatedAsyncioTestCase.__init__#���s:������� ������$�$�$�"���#.�#;�#=�#=�� � � �����c������������������� ���K����d�S�r ������r���s��� r���� asyncSetUpz"IsolatedAsyncioTestCase.asyncSetUp(���������������r���c������������������� ���K����d�S�r ���r���r���s��� r���� asyncTearDownz%IsolatedAsyncioTestCase.asyncTearDown+���r���r���c�����������������(������|�j���������|g|�R�i�|���d�S�r ���)� addCleanup�r����func�args�kwargss��� r����addAsyncCleanupz'IsolatedAsyncioTestCase.addAsyncCleanup.���s)������� ���$�����1�&�1�1�1�1�1r���c����������������������K����t����������|������������} �|j��������}|j��������}n/#�t����������$�r"�t ����������d|j����������d|j����������d�������������d�w�xY�w�||��������������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���������������������d�S�r ���)r����get_loopr����run�setUp� _callAsyncr���r���s��� r���� _callSetUpz"IsolatedAsyncioTestCase._callSetUpQ���sL������� ��$�$�&�&�&�� �$�$�T�Z�0�0�0������(�(�(�(�(r���c������������������t�����|�����������������������|�������������"t����������j��������d|��d�t����������d��������������d�S�d�S�)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._callTestMethodY���sd����������'�'�3��M��2�(.�2��2��2�3E�RS� U�� U�� U�� U�� U�� U��4�3r���c������������������x�����|�����������������������|�j���������������������|�j�����������������������������|�j���������������������d�S�r ���)r7���r���r���r5����tearDownr���s��� r���� _callTearDownz%IsolatedAsyncioTestCase._callTearDown^���s6����������*�+�+�+�� �$�$�T�]�3�3�3�3�3r���c������������������(������|�j���������|g|�R�i�|���d�S�r ���)r=���)r����functionr ���r!���s��� r����_callCleanupz$IsolatedAsyncioTestCase._callCleanupb���s+���������X�7��7�7�7��7�7�7�7�7r���c����������������������|�j���������� J�d���������������t����������j��������|������������s J�|�d����������������|�j�������������������������������||i�|��|�j���������������������S�)N�!asyncio runner is not initializedz is not an async function��context�r����inspect�iscoroutinefunctionr5���r���r���s��� r���r7���z"IsolatedAsyncioTestCase._callAsynce���sz�������"�.�.�0S�.�.�.��*�4�0�0�V�V�T�2V�2V�2V�V�V�0��"�&�&��D�$�!�&�!�!��,��'�� �� �� r���c�����������������������|�j���������� J�d���������������t����������j��������|������������r'|�j�������������������������������||i�|��|�j���������������������S��|�j��������j��������|g|�R�i�|��S�)NrJ���rK���rM���r���s��� r���r=���z'IsolatedAsyncioTestCase._callMaybeAsyncm���s��������"�.�.�0S�.�.�.��&�t�,�,�� G��&�*�*���d�%�f�%�%��0��+������ � �0�4�+�/��F�t�F�F�F�v�F�F�Fr���c������������������`�����|�j���������� J�d���������������t����������j��������d�������������}||�_���������d�S�)Nz%asyncio runner is already initializedT)�debug)r����asyncio�Runner�r����runners��� r����_setupAsyncioRunnerz+IsolatedAsyncioTestCase._setupAsyncioRunnerw���s:�������"�*�*�,S�*�*�*���d�+�+�+��$����r���c������������������<�����|�j���������}|������������������������������������d�S�r ���)r����closerU���s��� r����_tearDownAsyncioRunnerz.IsolatedAsyncioTestCase._tearDownAsyncioRunner|���s�������$���������r���Nc�������������������������|�������������������������������������� �t���������������������������������������������|������������|�������������������������������������S�#�|�������������������������������������w�xY�wr ���)rW���r ���r5���rZ���)r���r1���r���s��� �r���r5���zIsolatedAsyncioTestCase.run����sZ�������� � �"�"�"� *��7�7�;�;�v�&�&��'�'�)�)�)�)��D�'�'�)�)�)�)���s���� A��A"c������������������������|��������������������������������������t������������������������������������������������������������|�������������������������������������d�S�r ���)rW���r ���rR���rZ���)r���r���s��� �r���rR���zIsolatedAsyncioTestCase.debug����s>�������� � �"�"�"� ��� � �����#�#�%�%�%�%�%r���c������������������@�����|�j����������|�������������������������������������d�S�d�S�r ���)r���rZ���r���s��� r����__del__zIsolatedAsyncioTestCase.__del__����s+��������*��'�'�)�)�)�)�)��+�*r���)r���r ���)�__name__r+���r,���r���r���r���r"���r2���r8���rB���rE���rH���r7���r=���rW���rZ���r5���rR���r^���� __classcell__)r���s���@r���r���r��� ���s=��������������4>��>��>��>��>��>� �� �� � �� �� � 2�� 2�� 2������()��)��)�U��U��U� 4��4��4�8��8��8� �� �� �G��G��G�%��%��%� �����*��*��*��*��*��*�&��&��&��&��&� *��*��*��*��*��*��*r���r���)rS���r ���rN���r>����caser���r���r���r���r����<module>rb������s|����������������������������������������E*��E*��E*��E*��E*�h��E*��E*��E*��E*��E*r���