File: //opt/alt/python312/lib64/python3.12/test/test_asyncio/__pycache__/test_timeouts.cpython-312.pyc
�
}h�e%+ � � � d Z ddlZddlZddlZddlmZ d� Z G d� dej � Ze dk( r ej � yy)zTests for asyncio/timeouts.py� N)�await_without_taskc �. � t j d � y )N)�asyncio�set_event_loop_policy� � �F/opt/alt/python312/lib64/python3.12/test/test_asyncio/test_timeouts.py�tearDownModuler
s � ��!�!�$�'r c �� � e Zd Zd� Zd� Zd� Zd� Zd� Zd� Zd� Z d� Z
d � Zd
� Zd� 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"y!)"�TimeoutTestsc � �j K � | j t � 5 t j d� 4 �d { ��� }t j d� � d { ��� d d d � �d { ��� d d d � | j j
� � y 7 �Y7 �>7 �0# 1 �d { ���7 sw Y �@xY w# 1 sw Y �DxY w�w�N�{�G�z�?�
)�assertRaises�TimeoutErrorr �timeout�sleep�
assertTrue�expired��self�cms r �test_timeout_basiczTimeoutTests.test_timeout_basic s� � �� �
�
�
�|�
,� (����t�,�
(�
(���m�m�B�'�'�'�
(�
(� (�
����
�
��%�
(��'��
(��
(�
(�
(�� (� (�ss �B3�B'�B�B'�B�B�B�B'�B� B'�$(B3�B'�B�B'�B$ �B�B$ � B'�'B0�,B3c � � K � t j � }| j t � 5 |j � dz }t j
|� 4 �d { ��� }t j d� � d { ��� d d d � �d { ��� d d d � | j j � � | j |j � � y 7 �y7 �^7 �P# 1 �d { ���7 sw Y �`xY w# 1 sw Y �dxY w�wr )r �get_running_loopr r �time�
timeout_atr r r �assertEqual�when)r �loop�deadliner s r �test_timeout_at_basicz"TimeoutTests.test_timeout_at_basic s� � �� ��'�'�)��
�
�
�|�
,� (��y�y�{�T�)�H��)�)�(�3�
(�
(�r��m�m�B�'�'�'�
(�
(� (�
����
�
��%�����2�7�7�9�-�
(��'��
(��
(�
(�
(�� (� (�sw �*C:�-C.�C�C.�C�6C�7C�;C.�C�C.�AC:�C.�C�C.�C+ �C"� C+ �'C.�.C7�3C:c � �� K � t j � }d}| j t � 5 |j � dz }t j
|� 4 �d { ��� } t j
|� 4 �d { ��� }t j d� � d { ��� d d d � �d { ��� d d d � �d { ��� d d d � | j |� | j j � � | j j � � y 7 ��7 ��7 ��7 �r# 1 �d { ���7 sw Y ��xY w# t j $ r d}� w xY w7 ��# 1 �d { ���7 sw Y ��xY w# 1 sw Y ��xY w�w�NFr r T)
r r r r r r r �CancelledErrorr r )r r! � cancelledr"