Sindbad~EG File Manager

Current Path : /usr/local/lib/python3.11/unittest/test/testmock/__pycache__/
Upload File :
Current File : //usr/local/lib/python3.11/unittest/test/testmock/__pycache__/testasync.cpython-311.opt-2.pyc

�

TԚg����ddlZddlZddlZddlZddlZddlmZddlmZej	d���ddlm
Z
mZddlmZddl
mZmZmZmZmZmZmZmZmZmZd	�ZGd
�d��ZGd�d
��Zd�Zd�Zd�ZGd�de��Ze �d�Z!e �d�Z"ed���Z#Gd�dej$��Z%Gd�dej$��Z&Gd�dej$��Z'Gd�dej$��Z(Gd�dej$��Z)Gd �d!ej$��Z*Gd"�d#e��Z+Gd$�d%ej$��Z,Gd&�d'ej$��Z-Gd(�d)ej$��Z.Gd*�d+ej$��Z/e d,krej0��dSdS)-�N)�contextmanager)�supportT)�module)�run�iscoroutinefunction)�IsolatedAsyncioTestCase)
�ANY�call�	AsyncMock�patch�	MagicMock�Mock�create_autospec�sentinel�	_CallList�sealc�.�tjd��dS�N)�asyncio�set_event_loop_policy���=/usr/local/lib/python3.11/unittest/test/testmock/testasync.py�tearDownModulers���!�$�'�'�'�'�'rc�L�eZdZd�Zd�Zd�Zed���Zed���Z	dS)�
AsyncClassc��dSrr��selfs r�__init__zAsyncClass.__init__����rc��
K�dSrrrs r�async_methodzAsyncClass.async_method�
�����rc��dSrrrs r�
normal_methodzAsyncClass.normal_methodr!rc��
K�dSrr)�clss r�async_class_methodzAsyncClass.async_class_methods����'+�trc��
K�dSrrrrr�async_static_methodzAsyncClass.async_static_methods����%)�TrN)
�__name__�
__module__�__qualname__r r#r&�classmethodr)�staticmethodr+rrrrrsQ���������&�&�&�!�!�!��+�+��[�+��)�)��\�)�)�)rrc��eZdZd�ZdS)�AwaitableClassc#�K�dV�dSrrrs r�	__await__zAwaitableClass.__await__"s���������rN)r,r-r.r4rrrr2r2!s����������rr2c��
K�dSrrrrr�
async_funcr6$r$rc��
K�dSrr)�a�b�cs   r�async_func_argsr;&r$rc��dSrrrrr�normal_funcr=(r!rc��eZdZd�ZdS)�NormalClassc��dSrrrs rr8z
NormalClass.a+r!rN)r,r-r.r8rrrr?r?*s����������rr?z.AsyncClassz.NormalClassc#�K�|�td��5dV�tj��ddd��dS#1swxYwYdS)Nzwas never awaited$)�assertWarnsRegex�RuntimeWarning�gc�collect)�tests r�assertNeverAwaitedrG2s�����	
�	�	�~�/C�	D�	D���
����	�
����	��������������������s�A�A�
Ac�2�eZdZd�Zd�Zd�Zd�Zd�Zd�ZdS)�AsyncPatchDecoratorTestc�f��tjtd���fd���}|��dS)Nr#c�L����t|����dSr)�
assertTruer��mock_methodrs �r�
test_asynczLAsyncPatchDecoratorTest.test_is_coroutine_function_patch.<locals>.test_async=s$����O�O�/��<�<�=�=�=�=�=r�r�objectr�rrOs` r� test_is_coroutine_function_patchz8AsyncPatchDecoratorTest.test_is_coroutine_function_patch<sB���	��j�.�	1�	1�	>�	>�	>�	>�
2�	1�	>��
�����rc���tjtd���fd���}tt�d����fd���}|��|��dS)Nr#c���|��}��tj|����t|��dSr�rL�inspect�isawaitabler�rN�mrs  �rrOz?AsyncPatchDecoratorTest.test_is_async_patch.<locals>.test_asyncC�:�����
�
�A��O�O�G�/��2�2�3�3�3���F�F�F�F�Frz
.async_methodc���|��}��tj|����t|��dSrrVrYs  �r�test_no_parent_attributezMAsyncPatchDecoratorTest.test_is_async_patch.<locals>.test_no_parent_attributeIr[r)rrQr�async_foo_name)rrOr]s`  r�test_is_async_patchz+AsyncPatchDecoratorTest.test_is_async_patchBs����	��j�.�	1�	1�	�	�	�	�
2�	1�	�

�.�/�/�/�	0�	0�	�	�	�	�
1�	0�	�
	�
���� � �"�"�"�"�"rc�f��tjtd���fd���}|��dS)Nr#c�>����|t��dSr��assertIsInstancerrMs �rrOzCAsyncPatchDecoratorTest.test_is_AsyncMock_patch.<locals>.test_asyncS�����!�!�+�y�9�9�9�9�9rrPrRs` r�test_is_AsyncMock_patchz/AsyncPatchDecoratorTest.test_is_AsyncMock_patchRsD���	��j�.�	1�	1�	:�	:�	:�	:�
2�	1�	:�	�
�����rc�f��tjtd���fd���}|��dS)Nr+c�>����|t��dSrrbrMs �rrOzPAsyncPatchDecoratorTest.test_is_AsyncMock_patch_staticmethod.<locals>.test_asyncZrdrrPrRs` r�$test_is_AsyncMock_patch_staticmethodz<AsyncPatchDecoratorTest.test_is_AsyncMock_patch_staticmethodYsE���	��j�"7�	8�	8�	:�	:�	:�	:�
9�	8�	:�	�
�����rc�f��tjtd���fd���}|��dS)Nr)c�>����|t��dSrrbrMs �rrOzOAsyncPatchDecoratorTest.test_is_AsyncMock_patch_classmethod.<locals>.test_asyncardrrPrRs` r�#test_is_AsyncMock_patch_classmethodz;AsyncPatchDecoratorTest.test_is_AsyncMock_patch_classmethod`sE���	��j�"6�	7�	7�	:�	:�	:�	:�
8�	7�	:�	�
�����rc���tt�d�d���tt�d�d����fd�����}t|������t	jt����dS)N�.async_func���return_value�.async_func_args�c���K���|jd����|jd����tt����t
t����t���d{V��d����tddd����d{V��d��dS)Nr;r6rnrr��r:)�assertEqual�
_mock_namercr6rr;)�func_args_mock�	func_mockrs  �rrOz@AsyncPatchDecoratorTest.test_async_def_patch.<locals>.test_asynchs������
���^�6�8I�J�J�J����Y�1�<�@�@�@��!�!�*�i�8�8�8��!�!�/�9�=�=�=����:�<�<�/�/�/�/�/�/��3�3�3����?�1�a�1�#=�#=�#=�=�=�=�=�=�=�q�A�A�A�A�Ar)rr,rrLrWrr6rRs` r�test_async_def_patchz,AsyncPatchDecoratorTest.test_async_def_patchgs����	�(�'�'�'�a�	8�	8�	8�	�(�,�,�,�1�	=�	=�	=�	B�	B�	B�	B�
>�	=�
9�	8�	B�	�J�J�L�L��������3�J�?�?�@�@�@�@�@rN)	r,r-r.rSr_rerhrkrzrrrrIrI;ss���������#�#�#� ���������A�A�A�A�ArrIc�2�eZdZd�Zd�Zd�Zd�Zd�Zd�ZdS)�AsyncPatchCMTestc�&���fd�}|��dS)Nc���tjtd��5}��t	|����ddd��dS#1swxYwYdS�Nr#)rrQrrLrrMs �rrOz>AsyncPatchCMTest.test_is_async_function_cm.<locals>.test_asynczs������j�.�9�9�
B�[���� 3�K� @� @�A�A�A�
B�
B�
B�
B�
B�
B�
B�
B�
B�
B�
B�
B����
B�
B�
B�
B�
B�
Bs�#A�A�ArrRs` r�test_is_async_function_cmz*AsyncPatchCMTest.test_is_async_function_cmys2���	B�	B�	B�	B�	B�	�
�����rc�&���fd�}|��dS)Nc����tjtd��5}|��}��t	j|����t
|��ddd��dS#1swxYwYdSr)rrQrrLrWrXrrYs  �rrOz5AsyncPatchCMTest.test_is_async_cm.<locals>.test_async�s������j�.�9�9�
�[��K�M�M������ 3�A� 6� 6�7�7�7��A����
�
�
�
�
�
�
�
�
�
�
�
����
�
�
�
�
�
s�AA*�*A.�1A.rrRs` r�test_is_async_cmz!AsyncPatchCMTest.test_is_async_cm�s-���	�	�	�	�	�	�
�����rc�&���fd�}|��dS)Nc���tjtd��5}��|t��ddd��dS#1swxYwYdSr)rrQrrcrrMs �rrOz9AsyncPatchCMTest.test_is_AsyncMock_cm.<locals>.test_async�s������j�.�9�9�
>�[��%�%�k�9�=�=�=�
>�
>�
>�
>�
>�
>�
>�
>�
>�
>�
>�
>����
>�
>�
>�
>�
>�
>s�A�A	�A	rrRs` r�test_is_AsyncMock_cmz%AsyncPatchCMTest.test_is_AsyncMock_cm�s-���	>�	>�	>�	>�	>�	�
�����rc�@���fd�}t|����dS)Nc���K�tt�d�t����5��tt��ddd��n#1swxYwY��t
jt����dS)Nrm)rr,rrcr6rLrWrrs�rrOz6AsyncPatchCMTest.test_async_def_cm.<locals>.test_async�s�������(�/�/�/����=�=�
=�
=��%�%�j�)�<�<�<�
=�
=�
=�
=�
=�
=�
=�
=�
=�
=�
=����
=�
=�
=�
=��O�O�G�7�
�C�C�D�D�D�D�Ds�!A�A�A�rrRs` r�test_async_def_cmz"AsyncPatchCMTest.test_async_def_cm�s=���	E�	E�	E�	E�	E�
	�J�J�L�L�����rc�����ddi�tj�ddi����fd���}��t|����t	|����dS)Nr8r9c��D�K����dd��dS�Nr8r9)rv��foors��rrOz>AsyncPatchCMTest.test_patch_dict_async_def.<locals>.test_async�s'��������S��X�s�+�+�+�+�+r)r�dictrLrr�rrOr�s` @r�test_patch_dict_async_defz*AsyncPatchCMTest.test_patch_dict_async_def�s}�����C�j��	��C�#�s��	$�	$�	,�	,�	,�	,�	,�
%�	$�	,�	
���+�J�7�7�8�8�8��J�J�L�L�����rc�L���ddi���fd�}t|����dS)Nr8c���K�tj�ddi��5���dd��ddd��dS#1swxYwYdSr�)rr�rvr�s��rrOzFAsyncPatchCMTest.test_patch_dict_async_def_context.<locals>.test_async�s��������C�#�s��,�,�
0�
0�� � ��S��3�/�/�/�
0�
0�
0�
0�
0�
0�
0�
0�
0�
0�
0�
0����
0�
0�
0�
0�
0�
0s�A�A	�A	r�r�s` @r�!test_patch_dict_async_def_contextz2AsyncPatchCMTest.test_patch_dict_async_def_context�sG�����C�j��	0�	0�	0�	0�	0�	0�	�J�J�L�L�����rN)	r,r-r.r�r�r�r�r�r�rrrr|r|xsn�������������������������rr|c�,�eZdZd�Zd�Zd�Zd�Zd�ZdS)�
AsyncMockTestc�f�t��}|�t|����dSr)rrLr�r�mocks  r� test_iscoroutinefunction_defaultz.AsyncMockTest.test_iscoroutinefunction_default�s,���{�{�����+�D�1�1�2�2�2�2�2rc��d�}t|��}|�t|����|�tj|����dS)Nc��
K�dSrrrrrr�z<AsyncMockTest.test_iscoroutinefunction_function.<locals>.foo�r$r�rrLrrW�rr�r�s   r�!test_iscoroutinefunction_functionz/AsyncMockTest.test_iscoroutinefunction_function�sT�������~�~�����+�D�1�1�2�2�2�����3�D�9�9�:�:�:�:�:rc���t��}|��}|�tj|����t	|��|�dt
|����dS)N�assert_awaited)rrLrWrXr�assertIn�dir�rr�rZs   r�test_isawaitablezAsyncMockTest.test_isawaitable�s_���{�{���D�F�F������+�A�.�.�/�/�/��A�����
�
�&��D�	�	�2�2�2�2�2rc��d�}t|��}|�t|����|�tj|����dS)Nc��dSrrrrrr�zCAsyncMockTest.test_iscoroutinefunction_normal_function.<locals>.foo�r!rr�r�s   r�(test_iscoroutinefunction_normal_functionz6AsyncMockTest.test_iscoroutinefunction_normal_function�sR�������~�~�����+�D�1�1�2�2�2�����3�D�9�9�:�:�:�:�:rc��tj��}|���}|���|���t|��}|�|tj��dSr)r�new_event_loop�
create_future�stop�closerrc�Future)r�loop�futr�s    r�test_future_isfuturez"AsyncMockTest.test_future_isfuture�sd���%�'�'��� � �"�"���	�	�����
�
������~�~�����d�G�N�3�3�3�3�3rN)r,r-r.r�r�r�r�r�rrrr�r��s_������3�3�3�;�;�;�3�3�3�;�;�;�4�4�4�4�4rr�c�X�eZdZd�Zd�Zejd��d���Zd�Zd�Z	dS)�AsyncAutospecTestc���ttd����fd���}ttd����fd���}|��|��dS)NT��autospecc�~����|jt����|t��dSr�rcr#rr
rMs �rrOz=AsyncAutospecTest.test_is_AsyncMock_patch.<locals>.test_async�s8����!�!�+�":�I�F�F�F��!�!�+�y�9�9�9�9�9rc�H����|jt��dSr)rcr&r
rMs �r�test_normal_methodzEAsyncAutospecTest.test_is_AsyncMock_patch.<locals>.test_normal_method�s"����!�!�+�";�Y�G�G�G�G�Gr�rr^)rrOr�s`  rrez)AsyncAutospecTest.test_is_AsyncMock_patch�s����	�~��	-�	-�	-�	:�	:�	:�	:�
.�	-�	:�
�~��	-�	-�	-�	H�	H�	H�	H�
.�	-�	H�	�
����������rc��|�t��5ttd���ddd��dS#1swxYwYdS)NT)�instance)�assertRaises�RuntimeErrorrr6rs r�test_create_autospec_instancez/AsyncAutospecTest.test_create_autospec_instance�s���
�
�
�|�
,�
,�	7�	7��J��6�6�6�6�	7�	7�	7�	7�	7�	7�	7�	7�	7�	7�	7�	7����	7�	7�	7�	7�	7�	7s�?�A�Az3Broken test from https://bugs.python.org/issue37251c�`�|�tt��t��dSr)rcrr2rrs r�$test_create_autospec_awaitable_classz6AsyncAutospecTest.test_create_autospec_awaitable_class�s&�����o�n�=�=�y�I�I�I�I�Irc���tt��}|ddd�����fd�}|�|jd��|�|j��|�|jg��|���t|����|�	t|����|�	tj�����|�|jd��|�|jtddd�����|�|jtddd���g��|���|�ddd���|�ddd���|���|�t&��5|�d���ddd��dS#1swxYwYdS)Nrnrrrtruc���K���d{V��dSrr)�	awaitables�r�mainz4AsyncAutospecTest.test_create_autospec.<locals>.main�s������O�O�O�O�O�O�O�O�Orr)�e)rr;rv�await_count�assertIsNone�
await_args�await_args_list�assert_not_awaitedrrLrr�iscoroutiner
�assert_awaited_once�assert_awaited_once_with�assert_awaited_withr�r��AssertionError�assert_any_await)r�specr�r�s   @r�test_create_autospecz&AsyncAutospecTest.test_create_autospec�s/�����/�/���D��A��O�O�O�	�	�	�	�	�	�	
����)�1�-�-�-����$�/�*�*�*�����-�r�2�2�2����!�!�!��D�D�F�F�������+�D�1�1�2�2�2�����+�I�6�6�7�7�7�����)�1�-�-�-������$�q�!�q�/�/�/�:�:�:�����-��Q��Q����/@�A�A�A�� � �"�"�"��%�%�a��a�%�0�0�0�� � ��A�� �+�+�+�������
�
�
�~�
.�
.�	'�	'��!�!�A�!�&�&�&�	'�	'�	'�	'�	'�	'�	'�	'�	'�	'�	'�	'����	'�	'�	'�	'�	'�	's�G5�5G9�<G9c�@���fd�}t|����dS)Nc����K�tt�d�d���5}|ddd���}��|jt����t
|������tj|������tj
|������|jd����|j
g����|j��|���|�d{V��ddd��n#1swxYwY��|jd����|jt#ddd�������|j
t#ddd���g��|���|�ddd���|�ddd���|���|�����|jd����|j����|j
g��dS)	NrqTr�rnrrrtrur)rr,rcr�rrLrrr�rWrXrvr�r�r�r�r�r
r�r�r�r��
reset_mock)rNr�rs  �rrOz>AsyncAutospecTest.test_patch_with_autospec.<locals>.test_async�s�������(�4�4�4�t�D�D�D�
 ��'�K��1��2�2�2�	��%�%�k�&6�	�B�B�B���� 3�K� @� @�A�A�A����� 3�I� >� >�?�?�?����� 3�I� >� >�?�?�?�� � ��!8�!�<�<�<�� � ��!<�b�A�A�A��!�!�+�"8�9�9�9��.�.�0�0�0���������
 �
 �
 �
 �
 �
 �
 �
 �
 �
 �
 ����
 �
 �
 �
 � 
���[�4�a�8�8�8����[�3�T�!�Q�!�_�_�_�E�E�E����[�8�4��1��?�?�?�:K�L�L�L��+�+�-�-�-��0�0��A��0�;�;�;��+�+�A�q�A�+�6�6�6��&�&�(�(�(��"�"�$�$�$����[�4�a�8�8�8����k�4�5�5�5����[�8�"�=�=�=�=�=s�DD4�4D8�;D8r�rRs` r�test_patch_with_autospecz*AsyncAutospecTest.test_patch_with_autospec�s8���	>�	>�	>�	>�	>�<	�J�J�L�L�����rN)
r,r-r.rer��unittest�skipr�r�r�rrrr�r��s}���������7�7�7��X�]�H�I�I�J�J�J�I�J�'�'�'�6 � � � � rr�c�V�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
S)�
AsyncSpecTestc����fd�}ttfD]=}��d|����5||��ddd��n#1swxYwY�>dS)Nc���|t��}��|jt����|jt
��dSr)rrcr#rr&r
)�	mock_typer�rs  �r�
inner_testzCAsyncSpecTest.test_spec_normal_methods_on_class.<locals>.inner_test!sJ����9�Z�(�(�D��!�!�$�"3�Y�?�?�?��!�!�$�"4�i�@�@�@�@�@rztest method types with �rr
�subTest�rr�r�s`  r�!test_spec_normal_methods_on_classz/AsyncSpecTest.test_spec_normal_methods_on_class s����	A�	A�	A�	A�	A�
$�Y�/�	&�	&�I����C�	�C�C�D�D�
&�
&��
�9�%�%�%�
&�
&�
&�
&�
&�
&�
&�
&�
&�
&�
&����
&�
&�
&�
&��	&�	&��A�A	�A	c��tt��}|�|jt��|�|jt��dSr)rrrcr#rr&r�s  r�+test_spec_normal_methods_on_class_with_mockz9AsyncSpecTest.test_spec_normal_methods_on_class_with_mock*sG���J�������d�/��;�;�;����d�0�$�7�7�7�7�7rc�2�tt��}t|��|�t��5|jddd��n#1swxYwY|�t��5|jddd��dS#1swxYwYdSr)rrrr��AttributeErrorr&r#r�s  r�0test_spec_normal_methods_on_class_with_mock_sealz>AsyncSpecTest.test_spec_normal_methods_on_class_with_mock_seal/s
���J�����T�
�
�
�
�
�
�~�
.�
.�	�	����	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�
�
�
�~�
.�
.�	�	����	�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�	�	s#�A�A�A�7B�B�Bc����fd�}tttfD]=}��d|����5||��ddd��n#1swxYwY�>dS)Nc�P��|t���}��||��t���5��t	j|������ddd��n#1swxYwY|t���}��||��dS�N�r��r6rcrGrLrWrXr=�r��
async_mock�	sync_mockrs   �rr�z8AsyncSpecTest.test_spec_mock_type_kw.<locals>.inner_test8s����"��
�3�3�3�J��!�!�*�i�8�8�8�#�D�)�)�
C�
C����� 3�J�J�L�L� A� A�B�B�B�
C�
C�
C�
C�
C�
C�
C�
C�
C�
C�
C����
C�
C�
C�
C�"�	�{�3�3�3�I��!�!�)�Y�7�7�7�7�7s�0A4�4A8�;A8ztest spec kwarg with �rr
rr�r�s`  r�test_spec_mock_type_kwz$AsyncSpecTest.test_spec_mock_type_kw7s����	8�	8�	8�	8�	8�$�Y��5�	&�	&�I����A�i�A�A�B�B�
&�
&��
�9�%�%�%�
&�
&�
&�
&�
&�
&�
&�
&�
&�
&�
&����
&�
&�
&�
&��	&�	&��A
�
A	�A	c����fd�}tttfD]=}��d|����5||��ddd��n#1swxYwY�>dS)Nc�L��|t��}��||��t���5��t	j|������ddd��n#1swxYwY|t��}��||��dSrr�r�s   �rr�z@AsyncSpecTest.test_spec_mock_type_positional.<locals>.inner_testFs����"��:�.�.�J��!�!�*�i�8�8�8�#�D�)�)�
C�
C����� 3�J�J�L�L� A� A�B�B�B�
C�
C�
C�
C�
C�
C�
C�
C�
C�
C�
C����
C�
C�
C�
C�"�	�+�.�.�I��!�!�)�Y�7�7�7�7�7s�0A3�3A7�:A7ztest spec positional with r�r�s`  r�test_spec_mock_type_positionalz,AsyncSpecTest.test_spec_mock_type_positionalEs����	8�	8�	8�	8�	8�$�Y��5�	&�	&�I����F�9�F�F�G�G�
&�
&��
�9�%�%�%�
&�
&�
&�
&�
&�
&�
&�
&�
&�
&�
&����
&�
&�
&�
&��	&�	&r�c���tt���}|�|t��|��}|�t	j|����t
|��dSr��rr=rcrLrWrXrr�s   r� test_spec_as_normal_kw_AsyncMockz.AsyncSpecTest.test_spec_as_normal_kw_AsyncMockSs_���k�*�*�*�����d�I�.�.�.��D�F�F������+�A�.�.�/�/�/��A�����rc���tt��}|�|t��|��}|�t	j|����t
|��dSrr�r�s   r�(test_spec_as_normal_positional_AsyncMockz6AsyncSpecTest.test_spec_as_normal_positional_AsyncMockZs\����%�%�����d�I�.�.�.��D�F�F������+�A�.�.�/�/�/��A�����rc�j��tjtdd����fd���}|��dS)Nr#Tr�c�>����|t��dSrrbrMs �rrOz6AsyncSpecTest.test_spec_async_mock.<locals>.test_asyncbrdrrPrRs` r�test_spec_async_mockz"AsyncSpecTest.test_spec_async_mockasI���	��j�.�t�	<�	<�	<�	:�	:�	:�	:�
=�	<�	:�	�
�����rc�^��ttd����fd���}|��dS)NTr�c�~����|t����|jt��dSr)rcr
r#rrMs �rrOzIAsyncSpecTest.test_spec_parent_not_async_attribute_is.<locals>.test_asyncis8����!�!�+�y�9�9�9��!�!�+�":�I�F�F�F�F�Frr�rRs` r�'test_spec_parent_not_async_attribute_isz5AsyncSpecTest.test_spec_parent_not_async_attribute_ishsJ���	�~�D�	)�	)�	)�	G�	G�	G�	G�
*�	)�	G�	�
�����rc�~��tjtdtj����fd���}|��dS)Nr#r�c������|t����tj|������tj|����dSr)rcr
�assertFalserWr�rXrMs �r�test_async_attributezFAsyncSpecTest.test_target_async_spec_not.<locals>.test_async_attributeqs]����!�!�+�y�9�9�9����W�0��=�=�>�>�>����W�0��=�=�>�>�>�>�>r)rrQrr?r8)rrs` r�test_target_async_spec_notz(AsyncSpecTest.test_target_async_spec_notpsR���	��j�.�{�}�	E�	E�	E�	?�	?�	?�	?�
F�	E�	?�
	������rc�t��tjtdt����fd���}|��dS)Nr8r�c�>����|t��dSrrb)�mock_async_funcrs �r� test_attribute_not_async_spec_iszUAsyncSpecTest.test_target_not_async_spec_is.<locals>.test_attribute_not_async_spec_iszs����!�!�/�9�=�=�=�=�=r)rrQr?r6)rr
s` r�test_target_not_async_spec_isz+AsyncSpecTest.test_target_not_async_spec_isysM���	��k�3�Z�	8�	8�	8�	>�	>�	>�	>�
9�	8�	>�(�(�*�*�*�*�*rc�h��ttt����fd���}|��dS)Nr�c�~����|jt����|t��dSrr�)�MockNormalClassrs �r� test_async_attributes_coroutineszRAsyncSpecTest.test_spec_async_attributes.<locals>.test_async_attributes_coroutines�s8����!�!�/�">�	�J�J�J��!�!�/�9�=�=�=�=�=r)r�normal_foo_namer)rrs` r�test_spec_async_attributesz(AsyncSpecTest.test_spec_async_attributessK���	��Z�	0�	0�	0�	>�	>�	>�	>�
1�	0�	>�	)�(�*�*�*�*�*rN)r,r-r.r�r�r�r�r�r�r�rrr	rrrrrr�r�s�������&�&�&�8�8�8�
���&�&�&�&�&�&����������������+�+�+�+�+�+�+�+rr�c�&�eZdZd�Zd�Zd�Zd�ZdS)�AsyncSpecSetTestc�j��tjtdd����fd���}|��dS)Nr#T��spec_setc�>����|t��dSrrb)r#rs �rrOz<AsyncSpecSetTest.test_is_AsyncMock_patch.<locals>.test_async�s����!�!�,�	�:�:�:�:�:rrPrRs` rrez(AsyncSpecSetTest.test_is_AsyncMock_patch�sH���	��j�.�4�	@�	@�	@�	;�	;�	;�	;�
A�	@�	;��
�����rc��ttj���}|�t	|����|�|t��dS�Nr)rrr#rLrrcr�s  r�test_is_async_AsyncMockz(AsyncSpecSetTest.test_is_async_AsyncMock�sL���*�"9�:�:�:�����+�D�1�1�2�2�2����d�I�.�.�.�.�.rc��tt���}|�t|j����|�t|j����|�|jt��|�|jt��|�|t��dSr)	r
rrLrr#rr&rcrr�s  r�test_is_child_AsyncMockz(AsyncSpecSetTest.test_is_child_AsyncMock�s����*�-�-�-�����+�D�,=�>�>�?�?�?����,�T�-?�@�@�A�A�A����d�/��;�;�;����d�0�)�<�<�<����d�I�.�.�.�.�.rc���t��}td����|_tj|d��5}|�|t��ddd��dS#1swxYwYdS)Nc��|Srr��xs r�<lambda>z=AsyncSpecSetTest.test_magicmock_lambda_spec.<locals>.<lambda>�s��a�rr��	mock_func)r
r%rrQrc)r�mock_obj�cms   r�test_magicmock_lambda_specz+AsyncSpecSetTest.test_magicmock_lambda_spec�s����;�;��&�K�K�8�8�8���
�\�(�K�
0�
0�	1�B��!�!�"�i�0�0�0�	1�	1�	1�	1�	1�	1�	1�	1�	1�	1�	1�	1����	1�	1�	1�	1�	1�	1s�A#�#A'�*A'N)r,r-r.rerrr(rrrrr�sP���������/�/�/�
/�/�/�1�1�1�1�1rrc�\�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�ZdS)�AsyncArgumentsc��K�d�}t|d���}|d���d{V��}|�|d��dS)Nc��
K�dSrr)r�vars  r�additionz6AsyncArguments.test_add_return_value.<locals>.addition�r$r�
ro��rrv)rr.r��outputs    r�test_add_return_valuez$AsyncArguments.test_add_return_value�sV����+�+�+����3�3�3���t�A�w�w�������������$�$�$�$�$rc���K�Gd�dt��}d�}t||d�����}|�|d��5|d���d{V��ddd��dS#1swxYwYdS)Nc��eZdZdS)�BAsyncArguments.test_add_side_effect_exception.<locals>.CustomErrorN�r,r-r.rrr�CustomErrorr6�s�������rr8c��
K�dSrr�r-s rr.z?AsyncArguments.test_add_side_effect_exception.<locals>.addition�r$rzside-effect��side_effectr0)�	Exceptionr�assertRaisesRegex)rr8r.r�s    r�test_add_side_effect_exceptionz-AsyncArguments.test_add_side_effect_exception�s�����*�*�*�*�*�)�*�*�*�%�%�%���{�{�=�/I�/I�J�J�J��
�
#�
#�K��
?�
?�	�	��$�q�'�'�M�M�M�M�M�M�M�	�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�	�	s�	A(�(A,�/A,c��~K�d�}t|���}|d���d{V��}|�|d��dS)Nc��K�|dzS�Nrnrr:s rr.z?AsyncArguments.test_add_side_effect_coroutine.<locals>.addition�s������7�Nrr;r0�r1�rr.r��results    r�test_add_side_effect_coroutinez-AsyncArguments.test_add_side_effect_coroutine��Z����	�	�	��X�.�.�.���t�A�w�w�������������#�#�#�#�#rc��~K�d�}t|���}|d���d{V��}|�|d��dS)Nc��|dzSrBrr:s rr.zEAsyncArguments.test_add_side_effect_normal_function.<locals>.addition�s����7�Nrr;r0rCr1rDs    r�$test_add_side_effect_normal_functionz3AsyncArguments.test_add_side_effect_normal_function�rGrc��
K�gd�}t|���}|D]&}|�|���d{V��|���'|�t��5}|���d{V��ddd��dS#1swxYwYdS)N�rnrrrtr;)rrvr��StopAsyncIteration)r�valsr��itemr�s     r�test_add_side_effect_iterablez,AsyncArguments.test_add_side_effect_iterable�s������y�y���T�*�*�*���	1�	1�D����4�4�6�6�\�\�\�\�\�\�4�0�0�0�0�
�
�
�1�
2�
2�	�a��$�&�&�L�L�L�L�L�L�L�	�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�	�	s�A8�8A<�?A<c��.K�Gd�dt��}d|d��g}t|���}|�|���d{V��d��|�|��5}|���d{V��ddd��dS#1swxYwYdS)Nc��eZdZdS)�OAsyncArguments.test_add_side_effect_exception_iterable.<locals>.SampleExceptionNr7rrr�SampleExceptionrS�s�������DrrTrnr�r;)r=rrvr�)rrTrNr�r�s     r�'test_add_side_effect_exception_iterablez6AsyncArguments.test_add_side_effect_exception_iterable�s
����	�	�	�	�	�i�	�	�	��?�?�5�)�)�*���T�*�*�*�����t�t�v�v�������q�)�)�)�
�
�
��
/�
/�	�1��$�&�&�L�L�L�L�L�L�L�	�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�	�	s�,B
�
B�Bc��K�td���}t|���}|���d{V��}|�||��dS)Nr/ro)r�assertIs)r�valuer�rEs    r�test_return_value_AsyncMockz*AsyncArguments.test_return_value_AsyncMock�sW�����r�*�*�*���e�,�,�,���t�v�v���������
�
�f�e�$�$�$�$�$rc���K�tj��}|�d��t|���}|���d{V��}|�|tj��dS)Nro)rr��
set_resultrrc�rr�r�rEs    r�test_return_value_awaitablez*AsyncArguments.test_return_value_awaitable�sj�����n�������t�����c�*�*�*���t�v�v�����������f�g�n�5�5�5�5�5rc��bK�tj��}|�d��t|g���}|���d{V��}|�|tj��|�t��5|���d{V��ddd��dS#1swxYwYdS)Nr;)rr�r[rrcr�rMr\s    r�!test_side_effect_awaitable_valuesz0AsyncArguments.test_side_effect_awaitable_values�s������n�������t�����c�U�+�+�+���t�v�v�����������f�g�n�5�5�5�
�
�
�1�
2�
2�	�	��$�&�&�L�L�L�L�L�L�L�	�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�	�	s�B$�$B(�+B(c��K�td���}t|���}|���d{V��}|�|d��dS)Nr/ror;r1)r�effectr�rEs    r�test_side_effect_is_AsyncMockz,AsyncArguments.test_side_effect_is_AsyncMock�sY������+�+�+���V�,�,�,���t�v�v�������������$�$�$�$�$rc����K�tj���d���fd�}t|���}|���d{V��}|�|���|���|����dS)NFc���K�d��S�NTr��ranrXs��r�innerz2AsyncArguments.test_wraps_coroutine.<locals>.inner�s������C��Lr��wraps)rr�rrvr�rL�rrhr�rErgrXs    @@r�test_wraps_coroutinez#AsyncArguments.test_wraps_coroutine�s��������� � ����	�	�	�	�	�	�
�u�%�%�%���t�v�v�������������'�'�'���������������rc�����K�d�d���fd�}t|���}|���d{V��}|�|���|���|����dS)NrnFc���d��Srerrfs��rrhz8AsyncArguments.test_wraps_normal_function.<locals>.inners
����C��Lrri)rrvr�rLrks    @@r�test_wraps_normal_functionz)AsyncArguments.test_wraps_normal_functions�����������	�	�	�	�	�	�
�u�%�%�%���t�v�v�������������'�'�'���������������rc��K�t��}|d��}|d��}|�d{V��|�d{V��|�td��td��g��|�|jtd��td��g��|�|jtd��td��g��dS)Nrrrn)r�assert_has_awaitsr
rvr��call_args_list)rr��mock2�mock1s    r�test_await_args_list_orderz)AsyncArguments.test_await_args_list_orders������[�[�
��
�1�
�
���
�1�
�
�������������������$�$�d�1�g�g�t�A�w�w�%7�8�8�8�����3�d�1�g�g�t�A�w�w�5G�H�H�H�����2�T�!�W�W�d�1�g�g�4F�G�G�G�G�GrN)r,r-r.r3r?rFrJrPrUrYr]r_rbrlrorurrrr*r*�s�������%�%�%����$�$�$�$�$�$����	�	�	�%�%�%�6�6�6�	�	�	�%�%�%�
�
�
�
�
�
�H�H�H�H�Hrr*c�,�eZdZd�Zd�Zd�Zd�Zd�ZdS)�AsyncMagicMethodsc�"�t��}|�|jt��|�|jt��|�|jt��|�|jt��dSr)r
rc�
__aenter__r�	__aexit__�	__anext__�	__aiter__�r�m_mocks  r�+test_async_magic_methods_return_async_mocksz=AsyncMagicMethods.test_async_magic_methods_return_async_mockssw���������f�/��;�;�;����f�.�	�:�:�:����f�.�	�:�:�:�	
���f�.�	�:�:�:�:�:rc�"�t��}|�|jt��|�|jt��|�|jt��|�|jt��dSr)rrc�	__enter__r
�__exit__�__next__�__len__�r�a_mocks  r�*test_sync_magic_methods_return_magic_mocksz<AsyncMagicMethods.test_sync_magic_methods_return_magic_mocks(sr���������f�.�	�:�:�:����f�o�y�9�9�9����f�o�y�9�9�9����f�n�i�8�8�8�8�8rc���t��}|�t|d����|�t|d����|�t|d����dS)Nryrzr{)r
rL�hasattrr}s  r�&test_magicmock_has_async_magic_methodsz8AsyncMagicMethods.test_magicmock_has_async_magic_methods/se������������5�5�6�6�6�������4�4�5�5�5�������4�4�5�5�5�5�5rc�:�t��}|�t|d����|�t|d����|�t|d����|�t|d����dS)Nr�r�r�r�)rrLr�r�s  r�%test_asyncmock_has_sync_magic_methodsz7AsyncMagicMethods.test_asyncmock_has_sync_magic_methods5s�������������4�4�5�5�5������
�3�3�4�4�4������
�3�3�4�4�4������	�2�2�3�3�3�3�3rc�>�t��}|�|jt��|�|jt��|�t
|j����|�t
|j����dSr)r
rcryrrzrLrr}s  r�&test_magic_methods_are_async_functionsz8AsyncMagicMethods.test_magic_methods_are_async_functions<s���������f�/��;�;�;����f�.�	�:�:�:����+�F�,=�>�>�?�?�?����+�F�,<�=�=�>�>�>�>�>rN)r,r-r.rr�r�r�r�rrrrwrws_������;�;�;�9�9�9�6�6�6�4�4�4�?�?�?�?�?rrwc�z�eZdZGd�d��ZGd�d��ZGd�d��Zd�Zd�Zd	�Zd
�Z	d�Z
dS)
�AsyncContextManagerTestc��eZdZd�Zd�ZdS)�/AsyncContextManagerTest.WithAsyncContextManagerc��
K�dSrr�r�args�kwargss   rryz:AsyncContextManagerTest.WithAsyncContextManager.__aenter__Gr$rc��
K�dSrrr�s   rrzz9AsyncContextManagerTest.WithAsyncContextManager.__aexit__Ir$rN)r,r-r.ryrzrrr�WithAsyncContextManagerr�Fs"������9�9�9�8�8�8�8�8rr�c��eZdZd�Zd�ZdS)�.AsyncContextManagerTest.WithSyncContextManagerc��dSrrr�s   rr�z8AsyncContextManagerTest.WithSyncContextManager.__enter__Lr!rc��dSrrr�s   rr�z7AsyncContextManagerTest.WithSyncContextManager.__exit__Nr!rN)r,r-r.r�r�rrr�WithSyncContextManagerr�Ks"������2�2�2�1�1�1�1�1rr�c��eZdZd�Zd�ZdS)�&AsyncContextManagerTest.ProductionCodec��d|_dSr)�sessionrs rr z/AsyncContextManagerTest.ProductionCode.__init__Rs
���D�L�L�Lrc���K�|j�d��4�d{V��}|����d{V��}|cddd���d{V��S#1�d{V��swxYwYdS)Nzhttps://python.org)r��post�json)r�response�vals   rr�z+AsyncContextManagerTest.ProductionCode.mainUs������|�(�(�)=�>�>�
�
�
�
�
�
�
�(�$�M�M�O�O�+�+�+�+�+�+���
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
����
�
�
�
�
�
s�A�
A�AN)r,r-r.r r�rrr�ProductionCoder�Ps2������	 �	 �	 �	�	�	�	�	rr�c����fd�}ttfD]=}��d|����5||��ddd��n#1swxYwY�>dS)Nc�l������}td���|_|d���}td���}tddi���|_||j_||jj_t|�	����}��
|ddi��dS)N�sessionmock��name�magic_cmr�r��{ro)r�r
r�rr�ryrpr�rr�rv)r��pcr'r�rErs     �rr�zKAsyncContextManagerTest.test_set_return_value_of_aenter.<locals>.inner_test[s�����$�$�&�&�B�"�
�6�6�6�B�J���
�+�+�+�B� �j�1�1�1�H�%�F�C�=�A�A�A�H�M�)1�B�M�&�+-�B�J�O�(�������^�^�F����V�f�c�]�3�3�3�3�3rz%test set return value of aenter with r�r�s`  r�test_set_return_value_of_aenterz7AsyncContextManagerTest.test_set_return_value_of_aenterZs����		4�		4�		4�		4�		4�$�Y�/�	&�	&�I����Q�i�Q�Q�R�R�
&�
&��
�9�%�%�%�
&�
&�
&�
&�
&�
&�
&�
&�
&�
&�
&����
&�
&�
&�
&��	&�	&r�c����fd�}ttfD]=}��d|����5||��ddd��n#1swxYwY�>dS)Nc�����d�����}||�����fd�}t|����}��������jj�����jj���j����j������|��dS)NFc��h�K��4�d{V��}d�ddd���d{V��n#1�d{V��swxYwY|Srer)rE�called�cm_mocks ��r�use_context_managerzqAsyncContextManagerTest.test_mock_supports_async_context_manager.<locals>.inner_test.<locals>.use_context_managerps������"�"�"�"�"�"�"�"�f�!�F�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"����"�"�"�"��
s�!�
+�+)r�rrLryr�rzr��assertIsNot)r�r'r��	cm_resultr�r�rs    @@�rr�zTAsyncContextManagerTest.test_mock_supports_async_context_manager.<locals>.inner_testks�������F��-�-�/�/�B��i��m�m�G�
�
�
�
�
�
��/�/�1�1�2�2�I��O�O�F�#�#�#��O�O�G�.�5�6�6�6��O�O�G�-�4�5�5�5���-�-�/�/�/���,�,�.�.�.����W�i�0�0�0�0�0rz!test context manager magics with r�r�s`  r�(test_mock_supports_async_context_managerz@AsyncContextManagerTest.test_mock_supports_async_context_managerjs����	1�	1�	1�	1�	1�($�Y�/�	&�	&�I����M�)�M�M�N�N�
&�
&��
�9�%�%�%�
&�
&�
&�
&�
&�
&�
&�
&�
&�
&�
&����
&�
&�
&�
&��	&�	&r�c����|���}t|���t��}|�j_�fd�}|�t
|����|��dS)Nc��h�K��4�d{V��}|cddd���d{V��S#1�d{V��swxYwYdSrr)rE�
mock_instances �rr�z^AsyncContextManagerTest.test_mock_customize_async_context_manager.<locals>.use_context_manager�s������$�
�
�
�
�
�
�
���
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
����
�
�
�
�
�
s�!�
+�+)r�r
rQryrprWr)rr��expected_resultr�r�s    @r�)test_mock_customize_async_context_managerzAAsyncContextManagerTest.test_mock_customize_async_context_manager�s|����/�/�1�1��!�(�+�+�
� �(�(��0?�
� �-�	�	�	�	�	�	
�
�
�c�-�-�/�/�0�0�/�B�B�B�B�Brc�����d�d��fd�}�fd�}|���}t|���|�_|�_�fd�}t	|����|����|����dS)NFc���K�d�dSrer)r��enter_calleds �r�enter_coroutineziAsyncContextManagerTest.test_mock_customize_async_context_manager_with_coroutine.<locals>.enter_coroutine�s������L�L�Lrc���K�d�dSrer)r��exit_calleds �r�exit_coroutinezhAsyncContextManagerTest.test_mock_customize_async_context_manager_with_coroutine.<locals>.exit_coroutine�s������K�K�Krc��h�K��4�d{V��	ddd���d{V��dS#1�d{V��swxYwYdSrr)r�s�rr�zmAsyncContextManagerTest.test_mock_customize_async_context_manager_with_coroutine.<locals>.use_context_manager�s������$�
�
�
�
�
�
�
�
��
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
����
�
�
�
�
�
s�!�
+�+)r�r
ryrzrrL)rr�r�r�r�r�r�r�s     @@@r�8test_mock_customize_async_context_manager_with_coroutinezPAsyncContextManagerTest.test_mock_customize_async_context_manager_with_coroutine�s����������	 �	 �	 �	 �	 �	�	�	�	�	��/�/�1�1��!�(�+�+�
�#2�
� �"0�
��	�	�	�	�	�	���!�!�"�"�"�����%�%�%�����$�$�$�$�$rc���d�}|���}t|��}|�t��5t	||����ddd��dS#1swxYwYdS)Nc��ZK�|4�d{V��t���#1�d{V��swxYwYdSr)�	TypeError)�context_managers r�raise_inzYAsyncContextManagerTest.test_context_manager_raise_exception_by_default.<locals>.raise_in�s�����&�
"�
"�
"�
"�
"�
"�
"�
"��k�k�!�
"�
"�
"�
"�
"�
"�
"�
"�
"�
"����
"�
"�
"�
"�
"�
"s��
$�$)r�r
r�r�r)rr�r�r�s    r�/test_context_manager_raise_exception_by_defaultzGAsyncContextManagerTest.test_context_manager_raise_exception_by_default�s���	"�	"�	"��/�/�1�1��!�(�+�+�
�
�
�
�y�
)�
)�	)�	)�����'�'�(�(�(�	)�	)�	)�	)�	)�	)�	)�	)�	)�	)�	)�	)����	)�	)�	)�	)�	)�	)s�A'�'A+�.A+N)r,r-r.r�r�r�r�r�r�r�r�rrrr�r�Ds�������9�9�9�9�9�9�9�9�
2�2�2�2�2�2�2�2�
��������&�&�&� &�&�&�4C�C�C�%�%�%�4)�)�)�)�)rr�c�<�eZdZGd�de��Zd�Zd�Zd�ZdS)�AsyncIteratorTestc� �eZdZd�Zd�Zd�ZdS)�#AsyncIteratorTest.WithAsyncIteratorc��gd�|_dS)N)r��	NormalFoo�baz)�itemsrs rr z,AsyncIteratorTest.WithAsyncIterator.__init__�s��4�4�4�D�J�J�Jrc��dSrrrs rr|z-AsyncIteratorTest.WithAsyncIterator.__aiter__�r!rc��
K�dSrrrs rr{z-AsyncIteratorTest.WithAsyncIterator.__anext__�r$rN)r,r-r.r r|r{rrr�WithAsyncIteratorr��s3������	5�	5�	5�	"�!�!�'�'�'�'�'rr�c���td����gd��j_�fd�}t|����}|�|gd���dS)N�testerr�rLc��,�K�d��2���d{V��S)Nc��"K�g|3d{V��}|��
6Srr)�.0�is  r�
<listcomp>zOAsyncIteratorTest.test_aiter_set_return_value.<locals>.main.<locals>.<listcomp>�s.����/�/�/�/�/�/�/�/��A�/�/�/�/s�r)�	mock_iters�rr�z;AsyncIteratorTest.test_aiter_set_return_value.<locals>.main�s-�����/�/�Y�/�/�/�/�/�/�/�/�/�/r)rr|rprrv)rr�rEr�s   @r�test_aiter_set_return_valuez-AsyncIteratorTest.test_aiter_set_return_value�sl����8�,�,�,�	�+4�9�9�	��(�	0�	0�	0�	0�	0��T�T�V�V�����������+�+�+�+�+rc����fd�}ttfD]=}��d|����5||��ddd��n#1swxYwY�>dS)Nc�~������}||��}��t|j������t|j������t|j������t|j����dSr)r�rrr|rLr{)r�r�r�rs   �rr�zIAsyncIteratorTest.test_mock_aiter_and_anext_asyncmock.<locals>.inner_test�s�����-�-�/�/�H�%�I�h�/�/�M�
���0��1C�D�D�E�E�E����0��1H�I�I�J�J�J��O�O�/��0B�C�C�D�D�D��O�O�/�
�0G�H�H�I�I�I�I�Irz%test aiter and anext corourtine with r�r�s`  r�#test_mock_aiter_and_anext_asyncmockz5AsyncIteratorTest.test_mock_aiter_and_anext_asyncmock�s����		J�		J�		J�		J�		J�$�Y�/�	&�	&�I����Q�i�Q�Q�R�R�
&�
&��
�9�%�%�%�
&�
&�
&�
&�
&�
&�
&�
&�
&�
&�
&����
&�
&�
&�
&��	&�	&r�c������d��gd����fd�}���fd�}���fd�}ttfD]�}��d|����5||��ddd��n#1swxYwY��d|����5||��ddd��n#1swxYwY��d|����5||��ddd��n#1swxYwY��dS)	Nc��NK�g}|23d{V��}|�|���6|Sr)�append)�iterator�accumulatorrOs   r�iteratez6AsyncIteratorTest.test_mock_async_for.<locals>.iterate�sW�����K�&�
)�
)�
)�
)�
)�
)�
)�d��"�"�4�(�(�(�(�'��s�$)�FOO�BAR�BAZc���|������}��t�|����g��dSr)r�rvr)r�r�r�rs  ��r�test_defaultz;AsyncIteratorTest.test_mock_async_for.<locals>.test_default�sL���%�I�d�&<�&<�&>�&>�?�?�M����S����!7�!7�8�8�"�=�=�=�=�=rc����|������}�dd�|j_��t	�|�������dSr)r�r|rprvr�r�r��expectedr�rs  ���r�test_set_return_valuezDAsyncIteratorTest.test_mock_async_for.<locals>.test_set_return_value�s_���%�I�d�&<�&<�&>�&>�?�?�M�3;�A�A�A�;�M�#�0����S����!7�!7�8�8�(�C�C�C�C�Crc����|������}t�dd���|j_��t�|�������dSr)r��iterr|rprvrr�s  ���r�test_set_return_value_iterzIAsyncIteratorTest.test_mock_async_for.<locals>.test_set_return_value_iter�sg���%�I�d�&<�&<�&>�&>�?�?�M�37������3D�3D�M�#�0����S����!7�!7�8�8�(�C�C�C�C�Crzdefault value with zset return_value with zset return_value iterator with r�)rr�r�r�r�r�r�s`    @@r�test_mock_async_forz%AsyncIteratorTest.test_mock_async_for�s:�����	�	�	�)�(�(��	>�	>�	>�	>�	>�	>�
	D�	D�	D�	D�	D�	D�	D�
	D�	D�	D�	D�	D�	D�	D�
$�Y�/�	6�	6�I����?�I�?�?�@�@�
(�
(���Y�'�'�'�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(����
(�
(�
(�
(����B�y�B�B�C�C�
1�
1�%�%�i�0�0�0�
1�
1�
1�
1�
1�
1�
1�
1�
1�
1�
1����
1�
1�
1�
1����K�	�K�K�L�L�
6�
6�*�*�9�5�5�5�
6�
6�
6�
6�
6�
6�
6�
6�
6�
6�
6����
6�
6�
6�
6��	6�	6s6�A�A#	�&A#	�B�B	�!B	�=C�C	�C	N)r,r-r.rQr�r�r�r�rrrr�r��sk������(�(�(�(�(�F�(�(�(�,�,�,�&�&�&�" 6� 6� 6� 6� 6rr�c��eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�ZdS)�AsyncMockAssertc�,�t��|_dSr)rr�rs r�setUpzAsyncMockAssert.setUp�s���K�K��	�	�	rc��0K�|j|i|���d{V��dSr)r�r�s   r�_runnable_testzAsyncMockAssert._runnable_test�s5�����d�i��(��(�(�(�(�(�(�(�(�(�(�(rc��K�|�d{V��Srr)r�	coroutines  r�_await_coroutinez AsyncMockAssert._await_coroutines�����������rc��tt��}t|��5|���ddd��n#1swxYwY|�t|j����|j���|j���|j���|�	t��5|���ddd��n#1swxYwY|�	t��5|j���ddd��dS#1swxYwYdSr)rrrGr#rLr�
assert_called�assert_called_once�assert_called_once_withr�r�r�r�s  r�"test_assert_called_but_not_awaitedz2AsyncMockAssert.test_assert_called_but_not_awaiteds�����$�$��
��
%�
%�	 �	 �������	 �	 �	 �	 �	 �	 �	 �	 �	 �	 �	 ����	 �	 �	 �	 ����+�D�,=�>�>�?�?�?���'�'�)�)�)���,�,�.�.�.���1�1�3�3�3�
�
�
�~�
.�
.�	"�	"����!�!�!�	"�	"�	"�	"�	"�	"�	"�	"�	"�	"�	"����	"�	"�	"�	"�
�
�
�~�
.�
.�	/�	/���,�,�.�.�.�	/�	/�	/�	/�	/�	/�	/�	/�	/�	/�	/�	/����	/�	/�	/�	/�	/�	/s5�A�A	�A	�C=�=D�D�"E	�	E
�E
c��tt��}|���}|j���|j���|j���|�t��5|j���ddd��n#1swxYwYt|�
|����|j���|j���|j���|j���dSr)
rrr#rrrr�r�r�rrr�r�)rr��mock_coroutines   r�test_assert_called_then_awaitedz/AsyncMockAssert.test_assert_called_then_awaitedsU����$�$���*�*�,�,����'�'�)�)�)���,�,�.�.�.���1�1�3�3�3�
�
�
�~�
.�
.�	/�	/���,�,�.�.�.�	/�	/�	/�	/�	/�	/�	/�	/�	/�	/�	/����	/�	/�	/�	/�	�D�!�!�.�1�1�2�2�2���,�,�.�.�.���(�(�*�*�*���-�-�/�/�/���2�2�4�4�4�4�4s�B4�4B8�;B8c���|�t��5|j���ddd��n#1swxYwY|�t��5|j���ddd��n#1swxYwYt|�����|j���|j���dSr)	r�r�r�r�rrr�rr�rs r�+test_assert_called_and_awaited_at_same_timez;AsyncMockAssert.test_assert_called_and_awaited_at_same_time"sH��
�
�
�~�
.�
.�	'�	'��I�$�$�&�&�&�	'�	'�	'�	'�	'�	'�	'�	'�	'�	'�	'����	'�	'�	'�	'��
�
�~�
.�
.�	&�	&��I�#�#�%�%�%�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&����	&�	&�	&�	&�	�D���!�!�"�"�"��	�$�$�&�&�&��	�%�%�'�'�'�'�'s#�A�A�A�&B�B�Bc�<�tt��}|���}t|��5|���ddd��n#1swxYwY|�t
��5|j���ddd��n#1swxYwY|j���t|�	|����|j���|j�
��dSr)rrr#rGr�r�r�rrrr��rr�r�s   r�)test_assert_called_twice_and_awaited_oncez9AsyncMockAssert.test_assert_called_twice_and_awaited_once-sv����$�$���%�%�'�'�	� ��
%�
%�	 �	 �������	 �	 �	 �	 �	 �	 �	 �	 �	 �	 �	 ����	 �	 �	 �	 �
�
�
�~�
.�
.�	/�	/���,�,�.�.�.�	/�	/�	/�	/�	/�	/�	/�	/�	/�	/�	/����	/�	/�	/�	/���'�'�)�)�)��D�!�!�)�,�,�-�-�-���(�(�*�*�*���-�-�/�/�/�/�/s#�A�A� A�>B$�$B(�+B(c��tt��}|���}|j���t	|�|����|�t��5t	|�|����ddd��n#1swxYwY|j���dSr)	rrr#rrrr�r�r�rs   r�)test_assert_called_once_and_awaited_twicez9AsyncMockAssert.test_assert_called_once_and_awaited_twice;s�����$�$���%�%�'�'�	���,�,�.�.�.��D�!�!�)�,�,�-�-�-�
�
�
�|�
,�
,�	2�	2���%�%�i�0�0�1�1�1�	2�	2�	2�	2�	2�	2�	2�	2�	2�	2�	2����	2�	2�	2�	2�	
��(�(�*�*�*�*�*s�>#B-�-B1�4B1c��|�t��5|j���ddd��n#1swxYwY|�t��5|j���ddd��n#1swxYwY|�t
��5t
|�|j����ddd��n#1swxYwY|�t��5|j���ddd��n#1swxYwY|�t��5|j���ddd��dS#1swxYwYdSr)r�r�r�r�rr�rrrs r�"test_assert_awaited_but_not_calledz2AsyncMockAssert.test_assert_awaited_but_not_calledEs���
�
�
�~�
.�
.�	'�	'��I�$�$�&�&�&�	'�	'�	'�	'�	'�	'�	'�	'�	'�	'�	'����	'�	'�	'�	'�
�
�
�~�
.�
.�	&�	&��I�#�#�%�%�%�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&����	&�	&�	&�	&�
�
�
�y�
)�
)�	2�	2���%�%�d�i�0�0�1�1�1�	2�	2�	2�	2�	2�	2�	2�	2�	2�	2�	2����	2�	2�	2�	2��
�
�~�
.�
.�	'�	'��I�$�$�&�&�&�	'�	'�	'�	'�	'�	'�	'�	'�	'�	'�	'����	'�	'�	'�	'�
�
�
�~�
.�
.�	&�	&��I�#�#�%�%�%�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&����	&�	&�	&�	&�	&�	&sY�A�A�A�&B�B�B�1(C%�%C)�,C)�
D0�0D4�7D4�E<�<F�Fc�l�td��g}t|��5|�d��ddd��n#1swxYwY|j�|��|�t
��5|j�|��ddd��dS#1swxYwYdS�Nr�)r
rGr��assert_has_callsr�r�rq)r�kallss  r� test_assert_has_calls_not_awaitsz0AsyncMockAssert.test_assert_has_calls_not_awaitsSs(���e���
��
��
%�
%�	�	��I�I�e����	�	�	�	�	�	�	�	�	�	�	����	�	�	�	��	�"�"�5�)�)�)�
�
�
�~�
.�
.�	/�	/��I�'�'��.�.�.�	/�	/�	/�	/�	/�	/�	/�	/�	/�	/�	/�	/����	/�	/�	/�	/�	/�	/s#�A�A�	A�B)�)B-�0B-c�N�t|��5|���ddd��n#1swxYwYddifg}|�|jj|��t|��5|�d��ddd��n#1swxYwYt|��5|�d��ddd��n#1swxYwYt	��t	d��t	d��g}|�|jj|��dS)N�rr�r�)rGr�rv�
mock_callsr
)r�kalls_empty�
mock_kallss   r�0test_assert_has_mock_calls_on_async_mock_no_specz@AsyncMockAssert.test_assert_has_mock_calls_on_async_mock_no_spec[s���
��
%�
%�	�	��I�I�K�K�K�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	��B��|�n�������-�{�;�;�;�
��
%�
%�	�	��I�I�e����	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�
��
%�
%�	�	��I�I�e����	�	�	�	�	�	�	�	�	�	�	����	�	�	�	��v�v�t�E�{�{�D��K�K�8�
������-�z�:�:�:�:�:s0�1�5�5�1B�B�B�-C�C�Cc���tt��}t|��5|���ddd��n#1swxYwYddifg}|�|jj|��|�|jt
j��g��t|��5|�ddddd���ddd��n#1swxYwYt
��t
ddddd���g}t
j��t
jddddd���g}|�|jj|��|�|j|��dS)	Nrrrnrrrt�r0)r8r9)rrrGr#rvrr
)r�a_class_mockr�method_kallsrs     r�2test_assert_has_mock_calls_on_async_mock_with_speczBAsyncMockAssert.test_assert_has_mock_calls_on_async_mock_with_spechs��� ��,�,��
��
%�
%�	(�	(��%�%�'�'�'�	(�	(�	(�	(�	(�	(�	(�	(�	(�	(�	(����	(�	(�	(�	(��B��|�n������2�=�{�K�K�K�����0�4�3D�3F�3F�2G�H�H�H�
��
%�
%�	9�	9��%�%�a��A��a�%�8�8�8�	9�	9�	9�	9�	9�	9�	9�	9�	9�	9�	9����	9�	9�	9�	9�����Q��1��Q� 7� 7� 7�8���'�)�)�4�+<�Q��1��Q�+O�+O�+O�P�
�����2�=�|�L�L�L�����0�*�=�=�=�=�=s#�A�A	�A	�2C�C� Cc�
�t|��5|j�dd���ddd��n#1swxYwYt|��5|jj�dtj���ddd��n#1swxYwY|�|jjddddifdd	d
tjifgd��|�|jjjdd	d
tjifgd��dS)Nrt)�fishrC)�cake�	something)rtr#zsomething_else.something)rCr$z#method calls not recorded correctly)rGr�r%�something_elser�Cakerv�method_callsrs r� test_async_method_calls_recordedz0AsyncMockAssert.test_async_method_calls_recordedws���
��
%�
%�	.�	.��I������-�-�-�	.�	.�	.�	.�	.�	.�	.�	.�	.�	.�	.����	.�	.�	.�	.�
��
%�
%�	F�	F��I�$�.�.�q�x�}�.�E�E�E�	F�	F�	F�	F�	F�	F�	F�	F�	F�	F�	F����	F�	F�	F�	F�	
�����/�
�$����/�
'����
�/F�G�2
�
2�		3�	3�	3�
	
�����1�>�&��v�x�}�.E�F�G�>�	@�	@�	@�	@�	@s�9�=�=�,B�B�Bc�F���fd�}|�j��t���5����ddd��n#1swxYwYt���5��dd��ddd��n#1swxYwYt���5��d���ddd��n#1swxYwY�j���|�j��tt��}t���5|���ddd��n#1swxYwYt���5|�dd���ddd��n#1swxYwY|���||��dS)Nc����d}|D]^}t||��}��|t����|t����|g���_dS)N)rrr(r)�getattrrcr�listrv)r��namesr��attrrs    �r�assert_attrsz:AsyncMockAssert.test_async_arg_lists.<locals>.assert_attrs�su���D�E��
+�
+���t�T�*�*���%�%�d�I�6�6�6��%�%�d�D�1�1�1�� � ��r�*�*�*�*�	
+�
+rrnrrrt)r8)r�rGr�rrr#)rr0r�s`  r�test_async_arg_listsz$AsyncMockAssert.test_async_arg_lists�s����	+�	+�	+�	+�	+�	��T�Y����
��
%�
%�	�	��I�I�K�K�K�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�
��
%�
%�	�	��I�I�a��O�O�O�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�
��
%�
%�	�	��I�I��I�N�N�N�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�	
�	��������T�Y�����:�&�&��
��
%�
%�	"�	"����!�!�!�	"�	"�	"�	"�	"�	"�	"�	"�	"�	"�	"����	"�	"�	"�	"�
��
%�
%�	(�	(�����Q��'�'�'�	(�	(�	(�	(�	(�	(�	(�	(�	(�	(�	(����	(�	(�	(�	(�	��������V�����sY�A�A�A�!B�B�B�C�C�C�D9�9D=�D=�E7�7E;�>E;c��|�t��5|j���ddd��n#1swxYwYt	|�����|j���dSr)r�r�r�r�rr�rs r�test_assert_awaitedz#AsyncMockAssert.test_assert_awaited�s���
�
�
�~�
.�
.�	'�	'��I�$�$�&�&�&�	'�	'�	'�	'�	'�	'�	'�	'�	'�	'�	'����	'�	'�	'�	'�	�D���!�!�"�"�"��	� � �"�"�"�"�"s�A�A�Ac���|�t��5|j���ddd��n#1swxYwYt	|�����|j���t	|�����|�t��5|j���ddd��dS#1swxYwYdSr)r�r�r�r�rr�rs r�test_assert_awaited_oncez(AsyncMockAssert.test_assert_awaited_once�sU��
�
�
�~�
.�
.�	,�	,��I�)�)�+�+�+�	,�	,�	,�	,�	,�	,�	,�	,�	,�	,�	,����	,�	,�	,�	,�	�D���!�!�"�"�"��	�%�%�'�'�'��D���!�!�"�"�"�
�
�
�~�
.�
.�	,�	,��I�)�)�+�+�+�	,�	,�	,�	,�	,�	,�	,�	,�	,�	,�	,�	,����	,�	,�	,�	,�	,�	,s#�A�A�A�C(�(C,�/C,c���d}|�t|��5|j�d��ddd��n#1swxYwYt	|�����d}|�t|��5|j�d��ddd��n#1swxYwYt	|�d����|j�d��t	|�d����|�t��5|j�d��ddd��dS#1swxYwYdS)NzNot awaitedr�zexpected await not found�
SomethingElse)r>r�r�r�rr�r�)r�msgs  r�test_assert_awaited_withz(AsyncMockAssert.test_assert_awaited_with�s����
�
#�
#�N�C�
8�
8�	1�	1��I�)�)�%�0�0�0�	1�	1�	1�	1�	1�	1�	1�	1�	1�	1�	1����	1�	1�	1�	1�	�D���!�!�"�"�"�(��
�
#�
#�N�C�
8�
8�	1�	1��I�)�)�%�0�0�0�	1�	1�	1�	1�	1�	1�	1�	1�	1�	1�	1����	1�	1�	1�	1�	�D����&�&�'�'�'��	�%�%�e�,�,�,��D����0�0�1�1�1�
�
�
�~�
.�
.�	1�	1��I�)�)�%�0�0�0�	1�	1�	1�	1�	1�	1�	1�	1�	1�	1�	1�	1����	1�	1�	1�	1�	1�	1s5�A�A	�A	�B5�5B9�<B9�8E � E$�'E$c���|�t��5|j�d��ddd��n#1swxYwYt	|�d����|j�d��t	|�d����|�t��5|j�d��ddd��dS#1swxYwYdSr)r�r�r�r�rr�rs r�test_assert_awaited_once_withz-AsyncMockAssert.test_assert_awaited_once_with�s_��
�
�
�~�
.�
.�	6�	6��I�.�.�u�5�5�5�	6�	6�	6�	6�	6�	6�	6�	6�	6�	6�	6����	6�	6�	6�	6�	�D����&�&�'�'�'��	�*�*�5�1�1�1��D����&�&�'�'�'�
�
�
�~�
.�
.�	6�	6��I�.�.�u�5�5�5�	6�	6�	6�	6�	6�	6�	6�	6�	6�	6�	6�	6����	6�	6�	6�	6�	6�	6s#�A�A�	A�C-�-C1�4C1c�j�|�t��5|j�d��ddd��n#1swxYwYt	|�d����|�t��5|j�d��ddd��n#1swxYwYt	|�d����|j�d��t	|�d����|j�d��dS)Nr�r�r7)r�r�r�r�rr�rs r�test_assert_any_waitz$AsyncMockAssert.test_assert_any_wait�s���
�
�
�~�
.�
.�	.�	.��I�&�&�u�-�-�-�	.�	.�	.�	.�	.�	.�	.�	.�	.�	.�	.����	.�	.�	.�	.�	�D����&�&�'�'�'�
�
�
�~�
.�
.�	.�	.��I�&�&�u�-�-�-�	.�	.�	.�	.�	.�	.�	.�	.�	.�	.�	.����	.�	.�	.�	.�	�D����&�&�'�'�'��	�"�"�5�)�)�)��D����0�0�1�1�1��	�"�"�5�)�)�)�)�)s#�A�A�	A�	B0�0B4�7B4c���td��td��g}|�t��5}|j�|��ddd��n#1swxYwY|�t
|jj��d��t|�
d����|�t��5|j�|��ddd��n#1swxYwYt|�
d����|�t��5|j�|��ddd��n#1swxYwYt|�
d����|j�|��t|�
d����|j�|��dS)Nr�r�rnr7)r
r�r�r�rqrv�len�	exceptionr�rr�)r�callsr's   r�test_assert_has_awaits_no_orderz/AsyncMockAssert.test_assert_has_awaits_no_order�s[���e���d�5�k�k�*��
�
�
�~�
.�
.�	/�"��I�'�'��.�.�.�	/�	/�	/�	/�	/�	/�	/�	/�	/�	/�	/����	/�	/�	/�	/�����R�\�.�/�/��3�3�3��D����&�&�'�'�'�
�
�
�~�
.�
.�	/�	/��I�'�'��.�.�.�	/�	/�	/�	/�	/�	/�	/�	/�	/�	/�	/����	/�	/�	/�	/�	�D����&�&�'�'�'�
�
�
�~�
.�
.�	/�	/��I�'�'��.�.�.�	/�	/�	/�	/�	/�	/�	/�	/�	/�	/�	/����	/�	/�	/�	/�	�D����&�&�'�'�'��	�#�#�E�*�*�*��D����0�0�1�1�1��	�#�#�E�*�*�*�*�*s5�A � A$�'A$�C;�;C?�C?�E)�)E-�0E-c�R�Gd�d��}t|�|��d����|j�t	t
d��g��|j�t
d��|j�t
d��dS)Nc��eZdZd�ZdS)�9AsyncMockAssert.test_awaits_asserts_with_any.<locals>.Fooc��dSrr�r�others  r�__eq__z@AsyncMockAssert.test_awaits_asserts_with_any.<locals>.Foo.__eq__�r!rN�r,r-r.rIrrr�FoorE��������)�)�)�)�)rrKrn)rr�r�rqr
r	r�r�)rrKs  r�test_awaits_asserts_with_anyz,AsyncMockAssert.test_awaits_asserts_with_any�s���	*�	*�	*�	*�	*�	*�	*�	*�	�D�������q�)�)�*�*�*��	�#�#�T�#�q�\�\�N�3�3�3��	�%�%�c�1�-�-�-��	�"�"�3��*�*�*�*�*rc�L��Gd�d��}t|�����fd�}t||��d������ttd��g����td����td��dS)Nc��eZdZd�ZdS)�BAsyncMockAssert.test_awaits_asserts_with_spec_and_any.<locals>.Fooc��dSrrrGs  rrIzIAsyncMockAssert.test_awaits_asserts_with_spec_and_any.<locals>.Foo.__eq__r!rNrJrrrrKrP�rLrrKr�c��"�K��|��d{V��dSrr)r��mock_with_specs �r�_custom_mock_runnable_testzYAsyncMockAssert.test_awaits_asserts_with_spec_and_any.<locals>._custom_mock_runnable_tests,����� �.�$�'�'�'�'�'�'�'�'�'�'rrn)rrrqr
r	r�r�)rrKrTrSs   @r�%test_awaits_asserts_with_spec_and_anyz5AsyncMockAssert.test_awaits_asserts_with_spec_and_any�s����	*�	*�	*�	*�	*�	*�	*�	*�#��,�,�,��	(�	(�	(�	(�	(�	�&�&�s�s�u�u�a�0�0�1�1�1��(�(�$�s�A�,�,��8�8�8��*�*�3��2�2�2��'�'��Q�/�/�/�/�/rc��td��td��g}|�t��5|j�|d���ddd��n#1swxYwYt|�d����|�t��5|j�|d���ddd��n#1swxYwYt|�d����|�t��5|j�|d���ddd��n#1swxYwYt|�d����|j�|d���t|�d����|j�|d���dS)Nr�r�T)�	any_order�bamf�qux)r
r�r�r�rqrr�)rrAs  r�test_assert_has_awaits_orderedz.AsyncMockAssert.test_assert_has_awaits_orderedsV���e���d�5�k�k�*��
�
�
�~�
.�
.�	?�	?��I�'�'���'�>�>�>�	?�	?�	?�	?�	?�	?�	?�	?�	?�	?�	?����	?�	?�	?�	?�	�D����&�&�'�'�'�
�
�
�~�
.�
.�	?�	?��I�'�'���'�>�>�>�	?�	?�	?�	?�	?�	?�	?�	?�	?�	?�	?����	?�	?�	?�	?�	�D����'�'�(�(�(�
�
�
�~�
.�
.�	?�	?��I�'�'���'�>�>�>�	?�	?�	?�	?�	?�	?�	?�	?�	?�	?�	?����	?�	?�	?�	?�	�D����&�&�'�'�'��	�#�#�E�T�#�:�:�:��D����&�&�'�'�'��	�#�#�E�T�#�:�:�:�:�:s5�A"�"A&�)A&�)C�C�C�E�E�	Ec��|j���t|�����|�t
��5|j���ddd��dS#1swxYwYdSr)r�r�rr�r�r�rs r�test_assert_not_awaitedz'AsyncMockAssert.test_assert_not_awaiteds����	�$�$�&�&�&��D���!�!�"�"�"�
�
�
�~�
.�
.�	+�	+��I�(�(�*�*�*�	+�	+�	+�	+�	+�	+�	+�	+�	+�	+�	+�	+����	+�	+�	+�	+�	+�	+s�A<�<B�Bc��dd�}t|���|_t|�d����|�t
d�tjd������5}|j�	t��g��ddd��n#1swxYwY|�|jj
��|�t
d�tjd������5}|j�	t��tdd��g��ddd��n#1swxYwY|�|jj
t��dS)	Nc��
K�dSrrr"s r�fzIAsyncMockAssert.test_assert_has_awaits_not_matching_spec_error.<locals>.f'r$rr�rnz^{}$z6Awaits not found.
Expected: [call()]
Actual: [call(1)]z�Error processing expected awaits.
Errors: [None, TypeError('too many positional arguments')]
Expected: [call(), call(1, 2)]
Actual: [call(1)]rrr)rr�rr�r>r��format�re�escaperqr
r�r@�	__cause__rcr�)rr_r's   r�.test_assert_has_awaits_not_matching_spec_errorz>AsyncMockAssert.test_assert_has_awaits_not_matching_spec_error&s���!�!�!�!��1�%�%�%��	��D����"�"�#�#�#�
�
#�
#���
�
��I�2�3�3�4�4�5�5�	2�
9;��I�'�'�����1�1�1�
	2�	2�	2�	2�	2�	2�	2�	2�	2�	2�	2����	2�	2�	2�	2�	
���"�,�0�1�1�1�
�
#�
#���
�
��I�,�-�-�.�.�/�/�		>�35��I�'�'�����a����(<�=�=�=�		>�		>�		>�		>�		>�		>�		>�		>�		>�		>�		>����		>�		>�		>�		>�	
���b�l�4�i�@�@�@�@�@s$�<(B0�0B4�7B4�7E�E!�$E!N)r,r-r.r�r�rrrr
r
rrrrr!r)r1r3r5r9r;r=rBrMrUrZr\rdrrrr�r��s������� � � �)�)�)����/�/�/�5�5�5� 	(�	(�	(�0�0�0�+�+�+�&�&�&�/�/�/�;�;�;�
>�
>�
>�
@�
@�
@����:#�#�#�	,�	,�	,�1�1�1�"	6�	6�	6�*�*�*�+�+�+�*+�+�+�0�0�0�;�;�;�&+�+�+�A�A�A�A�Arr��__main__)1rrDrWrar��
contextlibrrFr�requires_working_socketrrr�
unittest.mockr	r
rrr
rrrrrrrr2r6r;r=rQr?r,r^rrG�TestCaserIr|r�r�r�rr*rwr�r�r�r�rrr�<module>rjsj������	�	�	�	�����	�	�	�	�����%�%�%�%�%�%����������t�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�G�G�G�G�G�G�G�G�G�G�G�G�G�G�G�G�G�G�G�G�G�G�G�G�(�(�(�	*�	*�	*�	*�	*�	*�	*�	*������������+�+�+���������&�����)�)�)���+�+�+��������:A�:A�:A�:A�:A�h�/�:A�:A�:A�z/�/�/�/�/�x�(�/�/�/�d4�4�4�4�4�H�%�4�4�4�BQ�Q�Q�Q�Q��)�Q�Q�Q�hf+�f+�f+�f+�f+�H�%�f+�f+�f+�R1�1�1�1�1�x�(�1�1�1�8wH�wH�wH�wH�wH�,�wH�wH�wH�t$?�$?�$?�$?�$?��)�$?�$?�$?�Lo)�o)�o)�o)�o)�h�/�o)�o)�o)�dB6�B6�B6�B6�B6��)�B6�B6�B6�JDA�DA�DA�DA�DA�h�'�DA�DA�DA�N
�z����H�M�O�O�O�O�O��r

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists