Your IP : 216.73.216.213


Current Path : /opt/alt/python311/lib64/python3.11/test/test_asyncio/__pycache__/
Upload File :
Current File : //opt/alt/python311/lib64/python3.11/test/test_asyncio/__pycache__/test_timeouts.cpython-311.pyc

�

�0�i?+���dZddlZddlZddlZddlmZddlmZd�ZGd�dej��Z	e
dkrej��dSdS)	zTests for asyncio/timeouts.py�N)�tasks)�await_without_taskc�.�tjd��dS)N)�asyncio�set_event_loop_policy���F/opt/alt/python311/lib64/python3.11/test/test_asyncio/test_timeouts.py�tearDownModulers���!�$�'�'�'�'�'r	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�Zd�Zd�Zd�Zd�Zd�Z d�Z!d �Z"d!S)"�TimeoutTestsc��lK�|�t��5tjd��4�d{V��}tjd���d{V��ddd���d{V��n#1�d{V��swxYwYddd��n#1swxYwY|�|�����dS�N�{�G�z�?�
)�assertRaises�TimeoutErrorr�timeout�sleep�
assertTrue�expired��self�cms  r
�test_timeout_basiczTimeoutTests.test_timeout_basicso����
�
�
�|�
,�
,�	(�	(���t�,�,�
(�
(�
(�
(�
(�
(�
(���m�B�'�'�'�'�'�'�'�'�'�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(����
(�
(�
(�
(�	(�	(�	(�	(�	(�	(�	(�	(�	(�	(�	(����	(�	(�	(�	(�	
����
�
���%�%�%�%�%�4�B�A%�B�%
A/	�/B�2A/	�3B�B�	Bc��K�tj��}|�t��5|���dz}tj|��4�d{V��}tjd���d{V��ddd���d{V��n#1�d{V��swxYwYddd��n#1swxYwY|�|�����|�	||�
����dSr)r�get_running_looprr�time�
timeout_atrrr�assertEqual�when)r�loop�deadliners    r
�test_timeout_at_basicz"TimeoutTests.test_timeout_at_basics������'�)�)��
�
�
�|�
,�
,�	(�	(��y�y�{�{�T�)�H��)�(�3�3�
(�
(�
(�
(�
(�
(�
(�r��m�B�'�'�'�'�'�'�'�'�'�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(����
(�
(�
(�
(�	(�	(�	(�	(�	(�	(�	(�	(�	(�	(�	(����	(�	(�	(�	(�	
����
�
���%�%�%�����2�7�7�9�9�-�-�-�-�-s5�2B,�"B�=B,�
B	�B,�B	�B,�,B0�3B0c���K�tj��}d}|�t��5|���dz}tj|��4�d{V��}	tj|��4�d{V��}tjd���d{V��ddd���d{V��n#1�d{V��swxYwYn#tj$rd}�wxYwddd���d{V��n#1�d{V��swxYwYddd��n#1swxYwY|�|��|�|�	����|�|�	����dS�NFrrT)
rrrrrr r�CancelledErrorrr)rr#�	cancelledr$�cm1�cm2s      r
�test_nested_timeoutsz!TimeoutTests.test_nested_timeouts!s������'�)�)���	�
�
�
�|�
,�
,�		�		��y�y�{�{�T�)�H��)�(�3�3�
�
�
�
�
�
�
�s��&�1�(�;�;�0�0�0�0�0�0�0�s�%�m�B�/�/�/�/�/�/�/�/�/�0�0�0�0�0�0�0�0�0�0�0�0�0�0�0�0�0�0�0�0�0�0�0����0�0�0�0����-���� $�I������
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
����
�
�
�
�		�		�		�		�		�		�		�		�		�		�		����		�		�		�		�	
���	�"�"�"�������
�
�&�&�&�������
�
�&�&�&�&�&sq�2D�$C'�&B?�B-�B?�-
B7�7B?�:B7�;B?�>C'�?C�C'�D�'
C1	�1D�4C1	�5D�D�Dc��~K�d}|�t��5tjd��4�d{V��	tjd���d{V��n#tj$rd}�wxYw	ddd���d{V��n#1�d{V��swxYwYddd��n#1swxYwY|�|��dSr')rrrrrr(r)rr)s  r
�test_waiter_cancelledz"TimeoutTests.test_waiter_cancelled2s������	�
�
�
�|�
,�
,�	�	���t�,�,�
�
�
�
�
�
�
�
��!�-��+�+�+�+�+�+�+�+�+�+���-���� $�I������,�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
����
�
�
�
�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�	
���	�"�"�"�"�"sK�B�B�A�B�A*�*B�.B�
B
	�
B�
B
	�B�B!�$B!c��K�tj��}tjd��4�d{V��}tjd���d{V��ddd���d{V��n#1�d{V��swxYwY|���}|�|�����|�|���|��dS)Nrr)	rrrrr�assertFalser�
assertGreaterr")rr#r�t1s    r
�test_timeout_not_calledz$TimeoutTests.test_timeout_not_called=s?�����'�)�)���?�2�&�&�	&�	&�	&�	&�	&�	&�	&�"��-��%�%�%�%�%�%�%�%�%�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&����	&�	&�	&�	&�
�Y�Y�[�[����������&�&�&����2�7�7�9�9�b�)�)�)�)�)s�A�
A'�*A'c��VK�tjd��4�d{V��}tjd���d{V��ddd���d{V��n#1�d{V��swxYwY|�|�����|�|�����dS�Nr)rrrr0r�assertIsNoner"rs  r
�test_timeout_disabledz"TimeoutTests.test_timeout_disabledFs$�����?�4�(�(�	&�	&�	&�	&�	&�	&�	&�B��-��%�%�%�%�%�%�%�%�%�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&����	&�	&�	&�	&�	
��������&�&�&����"�'�'�)�)�$�$�$�$�$��A
�

A�Ac��VK�tjd��4�d{V��}tjd���d{V��ddd���d{V��n#1�d{V��swxYwY|�|�����|�|�����dSr5)rr rr0rr6r"rs  r
�test_timeout_at_disabledz%TimeoutTests.test_timeout_at_disabledMs%�����%�d�+�+�	&�	&�	&�	&�	&�	&�	&�r��-��%�%�%�%�%�%�%�%�%�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&����	&�	&�	&�	&�	
��������&�&�&����"�'�'�)�)�$�$�$�$�$r8c��LK�tj��}|���}|�t��5tjd��4�d{V��}tjd���d{V��ddd���d{V��n#1�d{V��swxYwYddd��n#1swxYwY|���}|�|�����|�||�	��cxko|knc��dS)Nrr�
rrrrrrrrrr"�rr#�t0rr2s     r
�test_timeout_zerozTimeoutTests.test_timeout_zeroTs������'�)�)��
�Y�Y�[�[��
�
�
�|�
,�
,�	(�	(���q�)�)�
(�
(�
(�
(�
(�
(�
(�R��m�B�'�'�'�'�'�'�'�'�'�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(����
(�
(�
(�
(�	(�	(�	(�	(�	(�	(�	(�	(�	(�	(�	(����	(�	(�	(�	(��Y�Y�[�[������
�
���%�%�%�����b�g�g�i�i�-�-�-�-�2�-�-�-�-�.�.�.�.�.�6�B)�B�:B)�
B	�B)�B	�B)�)B-�0B-c��LK�tj��}|���}|�t��5tjd��4�d{V��}tjd���d{V��ddd���d{V��n#1�d{V��swxYwYddd��n#1swxYwY|���}|�|�����|�||�	��cxko|knc��dS)Nrr<r=s     r
�test_timeout_zero_sleep_zeroz)TimeoutTests.test_timeout_zero_sleep_zero^s������'�)�)��
�Y�Y�[�[��
�
�
�|�
,�
,�	'�	'���q�)�)�
'�
'�
'�
'�
'�
'�
'�R��m�A�&�&�&�&�&�&�&�&�&�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'����
'�
'�
'�
'�	'�	'�	'�	'�	'�	'�	'�	'�	'�	'�	'����	'�	'�	'�	'��Y�Y�[�[������
�
���%�%�%�����b�g�g�i�i�-�-�-�-�2�-�-�-�-�.�.�.�.�.r@c��LK�tj��}|���}|�t��5tjd��4�d{V��}tjd���d{V��ddd���d{V��n#1�d{V��swxYwYddd��n#1swxYwY|���}|�|�����|�||�	��cxko|knc��dS)Ni����rr<r=s     r
�#test_timeout_in_the_past_sleep_zeroz0TimeoutTests.test_timeout_in_the_past_sleep_zerohs������'�)�)��
�Y�Y�[�[��
�
�
�|�
,�
,�	'�	'���s�+�+�
'�
'�
'�
'�
'�
'�
'�r��m�A�&�&�&�&�&�&�&�&�&�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'����
'�
'�
'�
'�	'�	'�	'�	'�	'�	'�	'�	'�	'�	'�	'����	'�	'�	'�	'��Y�Y�[�[������
�
���%�%�%�����b�g�g�i�i�-�-�-�-�2�-�-�-�-�.�.�.�.�.r@c��$K�|�t��5tjd��4�d{V��}t�#1�d{V��swxYwY	ddd��n#1swxYwY|�|�����dSr5)r�KeyErrorrrr0rrs  r
�test_foreign_exception_passedz*TimeoutTests.test_foreign_exception_passedrs����
�
�
�x�
(�
(�	�	���t�,�,�
�
�
�
�
�
�
����
�
�
�
�
�
�
�
�
�
����
�
�
�
�
�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�	
��������&�&�&�&�&s.�A�A�
A
	�
A�
A
	�A�A"�%A"c��K�d�}|�t��5tjd��4�d{V��|���d{V��ddd���d{V��n#1�d{V��swxYwYddd��dS#1swxYwYdS)Nc��^K�	tjd���d{V��ddzdS#ddzwxYw)N�r)rrrr	r
�crashz=TimeoutTests.test_foreign_exception_on_timeout.<locals>.crashysH����
��m�A�&�&�&�&�&�&�&�&�&��!�������!������s�%�,r)r�ZeroDivisionErrorrr)rrKs  r
�!test_foreign_exception_on_timeoutz.TimeoutTests.test_foreign_exception_on_timeoutxsf����	�	�	�
�
�
�0�
1�
1�	�	���t�,�,�
�
�
�
�
�
�
�
��e�g�g�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
����
�
�
�
�	�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�	�	s4�A<�A�A<�
A(	�(A<�+A(	�,A<�<B�Bc��K�|�tj��5tjd��4�d{V��}tj�����tjd���d{V��ddd���d{V��n#1�d{V��swxYwYddd��n#1swxYwY|�|�����dS)Nr)	rrr(r�current_task�cancelrr0rrs  r
�1test_foreign_cancel_doesnt_timeout_if_not_expiredz>TimeoutTests.test_foreign_cancel_doesnt_timeout_if_not_expired�s�����
�
�
�w�5�
6�
6�	(�	(���r�*�*�
(�
(�
(�
(�
(�
(�
(�b��$�&�&�-�-�/�/�/��m�B�'�'�'�'�'�'�'�'�'�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(����
(�
(�
(�
(�	(�	(�	(�	(�	(�	(�	(�	(�	(�	(�	(����	(�	(�	(�	(�	
��������&�&�&�&�&s5�B,�AB�=B,�
B	�B,�B	�B,�,B0�3B0c���K�d�fd�}tj|����}|�d{V����|�������|�����dS)N�returnc��"�K���t��5tjd��4�d{V��tjd���d{V��ddd���d{V��n#1�d{V��swxYwYddd��dS#1swxYwYdS)Ng����MbP?r�rrrrr�rs�r
�outerz<TimeoutTests.test_outer_task_is_not_cancelled.<locals>.outer�s`������"�"�<�0�0�
,�
,�"�?�5�1�1�,�,�,�,�,�,�,�,�!�-��+�+�+�+�+�+�+�+�+�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,����,�,�,�,�
,�
,�
,�
,�
,�
,�
,�
,�
,�
,�
,�
,����
,�
,�
,�
,�
,�
,s4�B�A&�B�&
A0	�0B�3A0	�4B�B�B)rSN)r�create_taskr0r)r�done)rrW�tasks`  r
� test_outer_task_is_not_cancelledz-TimeoutTests.test_outer_task_is_not_cancelled�s������	,�	,�	,�	,�	,�	,�
�"�5�5�7�7�+�+���
�
�
�
�
�
�
�������)�)�*�*�*�����	�	���$�$�$�$�$r	c	��(K�|�t��5tjd��4�d{V��|�t��5tjd��4�d{V��t	jd��tjd���d{V��ddd���d{V��n#1�d{V��swxYwYddd��n#1swxYwYddd���d{V��n#1�d{V��swxYwYddd��dS#1swxYwYdS)Ng����Mb`?皙�����?rrJ)rrrrrrrVs r
�test_nested_timeouts_concurrentz,TimeoutTests.test_nested_timeouts_concurrent�s�����
�
�
�|�
,�
,�	/�	/���u�-�-�
/�
/�
/�
/�
/�
/�
/�
/��&�&�|�4�4�/�/�&��s�3�3�/�/�/�/�/�/�/�/��
�4�(�(�(�%�m�A�.�.�.�.�.�.�.�.�.�/�/�/�/�/�/�/�/�/�/�/�/�/�/�/�/�/�/�/�/�/�/�/����/�/�/�/�/�/�/�/�/�/�/�/�/�/�/����/�/�/�/�
/�
/�
/�
/�
/�
/�
/�
/�
/�
/�
/�
/�
/�
/�
/�
/�
/�
/�
/�
/�
/�
/�
/����
/�
/�
/�
/�	/�	/�	/�	/�	/�	/�	/�	/�	/�	/�	/�	/����	/�	/�	/�	/�	/�	/s|�D�C)�C�./B/	�C�/
B9
�9C�<B9
�=C�C)�C�C)�C�C)�D�)
C3	�3D�6C3	�7D�D�Dc	��*K�tj��}d|_|���}|�t
��5tjd��4�d{V��|�t
��5tjd��4�d{V��tjd��tjd���d{V��ddd���d{V��n#1�d{V��swxYwYddd��n#1swxYwYtjd���d{V��ddd���d{V��n#1�d{V��swxYwYddd��n#1swxYwY|���}|�||cxko|dzknc��dS)Nrr]rrJ)	rr�slow_callback_durationrrrrrr)rr#r>r2s    r
�test_nested_timeouts_loop_busyz+TimeoutTests.test_nested_timeouts_loop_busy�s�����'�)�)��&(��#�
�Y�Y�[�[��
�
�
�|�
,�
,�	(�	(���s�+�+�
(�
(�
(�
(�
(�
(�
(�
(��&�&�|�4�4�/�/�&��t�4�4�/�/�/�/�/�/�/�/��
�3����%�m�A�.�.�.�.�.�.�.�.�.�/�/�/�/�/�/�/�/�/�/�/�/�/�/�/�/�/�/�/�/�/�/�/����/�/�/�/�/�/�/�/�/�/�/�/�/�/�/����/�/�/�/��m�B�'�'�'�'�'�'�'�'�'�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(����
(�
(�
(�
(�	(�	(�	(�	(�	(�	(�	(�	(�	(�	(�	(����	(�	(�	(�	(��Y�Y�[�[������b�*�*�*�*�B��F�*�*�*�*�+�+�+�+�+s~�E�&D1�C:�/C	�C:�
C'
�'C:�*C'
�+C:�.D1�:C>�>D1�C>�D1�E�1
D;	�;E�>D;	�?E�E�Ec����K�tj��}|����|���dz��dz}��fd�}tj|����}��d{V��}|�|������|�|��|�|���|��|�d��|�|�����|�	��|�
tj��5|�d{V��ddd��n#1swxYwY|�|�
����dS)Nr�c����K�tj���4�d{V��}��|��tjd���d{V��ddd���d{V��dS#1�d{V��swxYwYdS)N�2)rr �
set_resultr)r�	deadline1�futs ��r
�fz'TimeoutTests.test_reschedule.<locals>.f�s������)�)�4�4�
(�
(�
(�
(�
(�
(�
(�����r�"�"�"��m�B�'�'�'�'�'�'�'�'�'�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(����
(�
(�
(�
(�
(�
(s�0A!�!
A+�.A+)rr�
create_futurerrXr!r"�
rescheduler6rPrr(r0r)rr#�	deadline2rirZrrgrhs      @@r
�test_reschedulezTimeoutTests.test_reschedule�s��������'�)�)��� � �"�"���I�I�K�K�"�$�	���N�	�	(�	(�	(�	(�	(�	(�
�"�1�1�3�3�'�'���Y�Y�Y�Y�Y�Y����������I�.�.�.�
�
�
�i� � � ���������I�.�.�.�
�
�
�d�������"�'�'�)�)�$�$�$����
�
�
�
�
�
�w�5�
6�
6�	�	��J�J�J�J�J�J�J�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	���������&�&�&�&�&s�	E�E�"Ec���K�tjd��4�d{V��}|�t|��d��ddd���d{V��dS#1�d{V��swxYwYdS)Nrz"<Timeout \[active\] when=\d+\.\d*>)rr�assertRegex�reprrs  r
�test_repr_activezTimeoutTests.test_repr_active�s�����?�2�&�&�	N�	N�	N�	N�	N�	N�	N�"����T�"�X�X�'L�M�M�M�	N�	N�	N�	N�	N�	N�	N�	N�	N�	N�	N�	N�	N�	N�	N�	N�	N�	N�	N�	N�	N�	N�	N�	N����	N�	N�	N�	N�	N�	N��$A�
A�!Ac��dK�|�t��5tjd��4�d{V��}tjd���d{V��ddd���d{V��n#1�d{V��swxYwYddd��n#1swxYwY|�t
|��d��dS)Nrrz<Timeout [expired]>)rrrrrr!rprs  r
�test_repr_expiredzTimeoutTests.test_repr_expired�sr����
�
�
�|�
,�
,�	(�	(���t�,�,�
(�
(�
(�
(�
(�
(�
(���m�B�'�'�'�'�'�'�'�'�'�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(����
(�
(�
(�
(�	(�	(�	(�	(�	(�	(�	(�	(�	(�	(�	(����	(�	(�	(�	(�	
����b���#8�9�9�9�9�9rc��K�tjd��4�d{V��}tjd���d{V��ddd���d{V��n#1�d{V��swxYwY|�t	|��d��dS)Nrrz<Timeout [finished]>)rrrr!rprs  r
�test_repr_finishedzTimeoutTests.test_repr_finished�s	�����?�2�&�&�	#�	#�	#�	#�	#�	#�	#�"��-��"�"�"�"�"�"�"�"�"�	#�	#�	#�	#�	#�	#�	#�	#�	#�	#�	#�	#�	#�	#�	#�	#�	#�	#�	#�	#�	#�	#�	#����	#�	#�	#�	#�	
����b���#9�:�:�:�:�:r8c���K�tjd��4�d{V��}|�t|��d��ddd���d{V��dS#1�d{V��swxYwYdS)Nz<Timeout [active] when=None>)rrr!rprs  r
�test_repr_disabledzTimeoutTests.test_repr_disabled�s�����?�4�(�(�	H�	H�	H�	H�	H�	H�	H�B����T�"�X�X�'F�G�G�G�	H�	H�	H�	H�	H�	H�	H�	H�	H�	H�	H�	H�	H�	H�	H�	H�	H�	H�	H�	H�	H�	H�	H�	H����	H�	H�	H�	H�	H�	Hrrc��VK�|�t��5tjd��4�d{V��	tjd���d{V��|�t��5tjd��4�d{V��tjd���d{V��ddd���d{V��n#1�d{V��swxYwYddd��n#1swxYwYn�#|�t��5tjd��4�d{V��tjd���d{V��ddd���d{V��n#1�d{V��swxYwYddd��w#1swxYwYwxYwddd���d{V��n#1�d{V��swxYwYddd��dS#1swxYwYdS)NrrJrrUrVs r
�test_nested_timeout_in_finallyz+TimeoutTests.test_nested_timeout_in_finally�s����
�
�
�|�
,�
,�	4�	4���t�,�,�
4�
4�
4�
4�
4�
4�
4�
4�4�!�-��*�*�*�*�*�*�*�*�*��*�*�<�8�8�4�4�#*�?�4�#8�#8�4�4�4�4�4�4�4�4�")�-��"3�"3�3�3�3�3�3�3�3�4�4�4�4�4�4�4�4�4�4�4�4�4�4�4�4�4�4�4�4�4�4�4����4�4�4�4�4�4�4�4�4�4�4�4�4�4�4����4�4�4�4����*�*�<�8�8�4�4�#*�?�4�#8�#8�4�4�4�4�4�4�4�4�")�-��"3�"3�3�3�3�3�3�3�3�4�4�4�4�4�4�4�4�4�4�4�4�4�4�4�4�4�4�4�4�4�4�4����4�4�4�4�4�4�4�4�4�4�4�4�4�4�4����4�4�4�4�4����	
4�
4�
4�
4�
4�
4�
4�
4�
4�
4�
4�
4�
4�
4�
4�
4�
4�
4�
4�
4�
4�
4�
4����
4�
4�
4�
4�	4�	4�	4�	4�	4�	4�	4�	4�	4�	4�	4�	4����	4�	4�	4�	4�	4�	4s��F�F�C�F�.C�	B6	�$C�6
C
�C�C
�C�F�C�F�C�F�E+�:E�E
�0E�
E�E�E�E�E+�E#�#E+�&E#�'E+�+F�.F�
F
	�
F�
F
	�F�F"�%F"c	���K�	tj�����tjd���d{V��n#tj$rYnwxYw|�t��5tjd��4�d{V��tjd���d{V��ddd���d{V��n#1�d{V��swxYwYddd��dS#1swxYwYdS#|�t��5tjd��4�d{V��tjd���d{V��ddd���d{V��n#1�d{V��swxYwYddd��w#1swxYwYwxYw)NrJg)rrOrPrr(rrrrVs r
�test_timeout_after_cancellationz,TimeoutTests.test_timeout_after_cancellation�s����	+�� �"�"�)�)�+�+�+��-��"�"�"�"�"�"�"�"�"�"���%�	�	�	��D�	�����"�"�<�0�0�
+�
+�"�?�3�/�/�+�+�+�+�+�+�+�+�!�-��*�*�*�*�*�*�*�*�*�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+����+�+�+�+�
+�
+�
+�
+�
+�
+�
+�
+�
+�
+�
+�
+����
+�
+�
+�
+�
+�
+���"�"�<�0�0�
+�
+�"�?�3�/�/�+�+�+�+�+�+�+�+�!�-��*�*�*�*�*�*�*�*�*�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+����+�+�+�+�
+�
+�
+�
+�
+�
+�
+�
+�
+�
+�
+����
+�
+�
+�
+�
+���s��?A�C&�A�C&�A�C&�3C�B;�)C�;
C	�C�C	�	C�C� C�&E2�E&�E		�7E&�	
E
�E&�E
�E&�E2�&E*�*E2�-E*�.E2c	��K�	tj�����tjd���d{V��n#tj$rYnwxYw|�tj��5tjd��4�d{V��tj�����tjd���d{V��ddd���d{V��n#1�d{V��swxYwYddd��dS#1swxYwYdS#|�tj��5tjd��4�d{V��tj�����tjd���d{V��ddd���d{V��n#1�d{V��swxYwYddd��w#1swxYwYwxYw)NrJg�?�)rrOrPrr(rrrVs r
�)test_cancel_in_timeout_after_cancellationz6TimeoutTests.test_cancel_in_timeout_after_cancellation�sW����		+�� �"�"�)�)�+�+�+��-��"�"�"�"�"�"�"�"�"�"���%�	�	�	��D�	�����"�"�7�#9�:�:�
+�
+�"�?�3�/�/�+�+�+�+�+�+�+�+��(�*�*�1�1�3�3�3�!�-��*�*�*�*�*�*�*�*�*�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+����+�+�+�+�
+�
+�
+�
+�
+�
+�
+�
+�
+�
+�
+�
+����
+�
+�
+�
+�
+�
+���"�"�7�#9�:�:�
+�
+�"�?�3�/�/�+�+�+�+�+�+�+�+��(�*�*�1�1�3�3�3�!�-��*�*�*�*�*�*�*�*�*�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+����+�+�+�+�
+�
+�
+�
+�
+�
+�
+�
+�
+�
+�
+����
+�
+�
+�
+�
+���s��?A�D�A�D�A�D�8D�AC%�D�%
C/	�/D�2C/	�3D�D�
D� G�0F:�AF	�F:�
F'
�'F:�*F'
�+F:�.G�:F>�>G�F>�Gc��xK�|�tj��5}tjd��4�d{V��tjd���d{V��ddd���d{V��n#1�d{V��swxYwYddd��n#1swxYwY|jj}t|tj��sJ�dS)NrrJ)	rrrrr�	exception�	__cause__�
isinstancer()r�exc�causes   r
�test_timeout_exception_causez)TimeoutTests.test_timeout_exception_cause�s{����
�
�
�w�3�
4�
4�	'����q�)�)�
'�
'�
'�
'�
'�
'�
'�
'��m�A�&�&�&�&�&�&�&�&�&�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'����
'�
'�
'�
'�	'�	'�	'�	'�	'�	'�	'�	'�	'�	'�	'����	'�	'�	'�	'��
�'���%��!7�8�8�8�8�8�8�8s4�B�A*�B�*
A4	�4B�7A4	�8B�B�Bc��HK�tjd��4�d{V��}|�td��5|4�d{V��	ddd���d{V��n#1�d{V��swxYwYddd��n#1swxYwYddd���d{V��dS#1�d{V��swxYwYdS�Nrzhas already been entered�rr�assertRaisesRegex�RuntimeErrorrs  r
�test_timeout_already_enteredz)TimeoutTests.test_timeout_already_entereds������?�4�(�(�	�	�	�	�	�	�	�B��'�'��6P�Q�Q�
�
�����������������������������������������
�
�
�
�
�
�
�
�
�
�
����
�
�
�
�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�	�	sX�B�	A3�A�A3�
A � A3�#A �$A3�'B�3A7	�7B�:A7	�;B�
B�Bc��JK�tjd��4�d{V��}	ddd���d{V��n#1�d{V��swxYwY|�td��5|4�d{V��	ddd���d{V��n#1�d{V��swxYwYddd��dS#1swxYwYdSr�r�rs  r
�test_timeout_double_enterz&TimeoutTests.test_timeout_double_enters������?�4�(�(�	�	�	�	�	�	�	�B��	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�
�
#�
#�L�2L�
M�
M�	�	��
�
�
�
�
�
�
�
��
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
����
�
�
�
�	�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�	�	sB�1�
;�;�	B�&A:�(B�:
B	�B�B	�B�B�Bc��K�tjd��4�d{V��}	ddd���d{V��n#1�d{V��swxYwY|�td��5|�d��ddd��dS#1swxYwYdS)Nr�finished�{�G�z�?�rrr�r�rkrs  r
�test_timeout_finishedz"TimeoutTests.test_timeout_finishedsQ�����?�4�(�(�	�	�	�	�	�	�	�B��	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�
�
#�
#�L�*�
=�
=�	 �	 ��M�M�$����	 �	 �	 �	 �	 �	 �	 �	 �	 �	 �	 �	 ����	 �	 �	 �	 �	 �	 s�1�
;�;�B�B�Bc��K�|�t��5tjd��4�d{V��}tjd���d{V��ddd���d{V��n#1�d{V��swxYwYddd��n#1swxYwY|�td��5|�d��ddd��dS#1swxYwYdS)NrrJrr�)rrrrrr�r�rkrs  r
�test_timeout_expiredz!TimeoutTests.test_timeout_expireds�����
�
�
�|�
,�
,�	'�	'���t�,�,�
'�
'�
'�
'�
'�
'�
'���m�A�&�&�&�&�&�&�&�&�&�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'����
'�
'�
'�
'�	'�	'�	'�	'�	'�	'�	'�	'�	'�	'�	'����	'�	'�	'�	'��
#�
#�L�)�
<�
<�	 �	 ��M�M�$����	 �	 �	 �	 �	 �	 �	 �	 �	 �	 �	 �	 ����	 �	 �	 �	 �	 �	 sF�B�A%�B�%
A/	�/B�2A/	�3B�B�	B�(C�C�Cc��K�tjd��4�d{V��}|�tj��5tjd���d{V��ddd��n#1swxYwY|�td��5|�d��ddd��n#1swxYwYddd���d{V��dS#1�d{V��swxYwYdS)NrrJ�expiringr�)rrrr(rr�r�rkrs  r
�test_timeout_expiringz"TimeoutTests.test_timeout_expiring s������?�4�(�(�	$�	$�	$�	$�	$�	$�	$�B��"�"�7�#9�:�:�
'�
'��m�A�&�&�&�&�&�&�&�&�&�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'����
'�
'�
'�
'��'�'��j�A�A�
$�
$��
�
�d�#�#�#�
$�
$�
$�
$�
$�
$�
$�
$�
$�
$�
$����
$�
$�
$�
$�	$�	$�	$�	$�	$�	$�	$�	$�	$�	$�	$�	$�	$�	$�	$�	$�	$�	$�	$�	$�	$�	$�	$�	$����	$�	$�	$�	$�	$�	$sX� C
�A$�C
�$A(	�(C
�+A(	�,C
�
B,� C
�,B0	�0C
�3B0	�4C
�

C�Cc���K�tjd��}|�td��5|�d��ddd��dS#1swxYwYdS)Nr�has not been enteredr�r�rs  r
�test_timeout_not_enteredz%TimeoutTests.test_timeout_not_entered's�����
�_�T�
"�
"��
�
#�
#�L�2H�
I�
I�	 �	 ��M�M�$����	 �	 �	 �	 �	 �	 �	 �	 �	 �	 �	 �	 ����	 �	 �	 �	 �	 �	 s�A�A�Ac��xK�tjd��}|�td��5t	|������d{V��ddd��n#1swxYwY|�td��5|�d��ddd��dS#1swxYwYdS)NrrZr�r�)rrr�r�r�
__aenter__rkrs  r
�test_timeout_without_taskz&TimeoutTests.test_timeout_without_task,s5����
�_�T�
"�
"��
�
#�
#�L�&�
9�
9�	6�	6�$�R�]�]�_�_�5�5�5�5�5�5�5�5�5�	6�	6�	6�	6�	6�	6�	6�	6�	6�	6�	6����	6�	6�	6�	6�
�
#�
#�L�2H�
I�
I�	 �	 ��M�M�$����	 �	 �	 �	 �	 �	 �	 �	 �	 �	 �	 �	 ����	 �	 �	 �	 �	 �	 s#�(A&�&A*�-A*�B/�/B3�6B3N)#�__name__�
__module__�__qualname__rr%r,r.r3r7r:r?rBrDrGrMrQr[r^rarmrqrtrvrxrzr|rr�r�r�r�r�r�r�r�rr	r
r
r
s�������&�&�&�.�.�.�'�'�'�"	#�	#�	#�*�*�*�%�%�%�%�%�%�/�/�/�/�/�/�/�/�/�'�'�'����'�'�'�	%�	%�	%�/�/�/�,�,�,�&'�'�'�4N�N�N�:�:�:�;�;�;�H�H�H�4�4�4�	+�	+�	+�
+�
+�
+�9�9�9������� � � � � � �$�$�$� � � �
 � � � � r	r
�__main__)�__doc__�unittestrrr�test.test_asyncio.utilsrr�IsolatedAsyncioTestCaser
r��mainrr	r
�<module>r�s���#�#�������������������6�6�6�6�6�6�(�(�(�b �b �b �b �b �8�3�b �b �b �J	�z����H�M�O�O�O�O�O��r