Hacked By AnonymousFox

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

�

�܋f�
���ddlZejdd�dkr7ddlZddlZddlmZddlmZmZm	Z	ddl
mZd�Zd�Z
d	�ZGd
�de��ZdSddlmZdd
l
mZdS)�N�)��)�
_is_coroutine)�ismethod�
isfunction�CO_COROUTINE)�TestCasec�|�t|tj��r!|j}t|tj���!|S�N)�
isinstance�	functools�partial�func)rs �_/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/mock/backports.py�_unwrap_partialrs:����y�0�1�1�	��9�D���y�0�1�1�	���c���t|��r|j}t|���t|��}t|��sdSt	|jj|z��S)z�Return true if ``f`` is a function (or a method or functools.partial
        wrapper wrapping a function) whose code object has the given ``flag``
        set in its flags.F)r�__func__rr�bool�__code__�co_flags)�f�flags  r�_has_code_flagrsa���q�k�k�	��
�A��q�k�k�	��A�����!�}�}�	��5��A�J�'�$�.�/�/�/rc�\�t|t��pt|dd��tuS)z}Return true if the object is a coroutine function.

        Coroutine functions are defined with "async def" syntax.
        rN)rr	�getattrr)�objs r�iscoroutinefunctionrs0��
�3��-�-�
A��C��$�/�/�=�@�	
rc�>��eZdZd�fd�	Zd�Zd�Zd�Zd	�fd�	Z�xZS)
�IsolatedAsyncioTestCase�runTestc�f��t���|��d|_d|_dSr)�super�__init__�_asyncioTestLoop�_asyncioCallsQueue)�self�
methodName�	__class__s  �rr%z IsolatedAsyncioTestCase.__init__(s1����G�G���Z�(�(�(�$(�D�!�&*�D�#�#�#rc���K�tj��x|_}|�d��	|����d{V��}|���|�J��3r)�asyncio�Queuer'�
set_result�get�	task_done)r(�fut�queue�querys    r�_asyncioLoopRunnerz*IsolatedAsyncioTestCase._asyncioLoopRunner-sm����.5�m�o�o�=�D�#�e��N�N�4� � � �
%�#�i�i�k�k�)�)�)�)�)�)�����!�!�!��}�}�}�
%rc�J�|j�J�tj��}tj|��|�d��||_|���}|�|�|����|_|�	|��dS)NT)
r&r,�new_event_loop�set_event_loop�	set_debug�
create_future�create_taskr4�_asyncioCallsTask�run_until_complete)r(�loopr1s   r�_setupAsyncioLoopz)IsolatedAsyncioTestCase._setupAsyncioLoop5s����(�0�0�0��)�+�+�D��"�4�(�(�(��N�N�4� � � �$(�D�!��$�$�&�&�C�%)�%5�%5�d�6M�6M�c�6R�6R�%S�%S�D�"��#�#�C�(�(�(�(�(rc��|j�J�|j}d|_|j�d��|�|j�����	|�|�����t
jd��|���dS#t
jd��|���wxYwr)	r&r'�
put_nowaitr<�join�shutdown_asyncgensr,r7�close)r(r=s  r�_tearDownAsyncioLoopz,IsolatedAsyncioTestCase._tearDownAsyncioLoop?s����(�4�4�4��(�D�$(�D�!��#�.�.�t�4�4�4��#�#�D�$;�$@�$@�$B�$B�C�C�C�
��'�'��(?�(?�(A�(A�B�B�B��&�t�,�,�,��
�
��������&�t�,�,�,��
�
�������s�'B0�0*CNc����|���	t���|��|���S#|���wxYwr)r>r$�runrD)r(�resultr*s  �rrFzIsolatedAsyncioTestCase.runMsZ����"�"�$�$�$�
,��w�w�{�{�6�*�*��)�)�+�+�+�+���)�)�+�+�+�+���s� A�A")r"r)	�__name__�
__module__�__qualname__r%r4r>rDrF�
__classcell__)r*s@rr!r!&s��������	+�	+�	+�	+�	+�	+�
	%�	%�	%�	)�	)�	)�	�	�	�	,�	,�	,�	,�	,�	,�	,�	,�	,�	,rr!)r)r!)�sys�version_infor,r�asyncio.coroutinesr�inspectrrr	�unittestr
rrrr!�rr�<module>rRs��
�
�
�
���B�Q�B��&� � ���������0�0�0�0�0�0�:�:�:�:�:�:�:�:�:�:�!�!�!�!�!�!����
	0�	0�	0�
�
�
�,,�,,�,,�,,�,,�(�,,�,,�,,�,,�,,�b,�+�+�+�+�+�0�0�0�0�0�0�0�0r

Hacked By AnonymousFox1.0, Coded By AnonymousFox