File: D:/Python311/Lib/test/test_asyncio/__pycache__/test_timeouts.cpython-311.opt-2.pyc
�
��Vc,# � � � d dl Z d dlZd dlZd dlmZ d� Z G d� de j � � Zedk r e j � � dS dS )� N)�tasksc �. � t j d � � d S )N)�asyncio�set_event_loop_policy� � �3D:\Python311\Lib\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� ZdS )�TimeoutTestsc � �l K � | � t � � 5 t j d� � 4 �d {V ��}t j d� � � d {V �� d d d � � �d {V �� n# 1 �d {V ��swxY w Y d d d � � n# 1 swxY w Y | � |� � � � � d S �N�{�G�z�?�
)�assertRaises�TimeoutErrorr �timeout�sleep�
assertTrue�expired��self�cms r �test_timeout_basiczTimeoutTests.test_timeout_basic so � � � �
�
�
�|�
,�
,� (� (���t�,�,�
(�
(�
(�
(�
(�
(�
(���m�B�'�'�'�'�'�'�'�'�'�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(����
(�
(�
(�
(� (� (� (� (� (� (� (� (� (� (� (���� (� (� (� (�
����
�
���%�%�%�%�%�4 �B�A%�B�%
A/ �/B�2A/ �3B�B� Bc � � K � t j � � }| � t � � 5 |� � � dz }t j |� � 4 �d {V ��}t j d� � � d {V �� d d d � � �d {V �� n# 1 �d {V ��swxY w Y d d d � � n# 1 swxY w Y | � |� � � � � | � ||�
� � � � d S r )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�3�
(�
(�
(�
(�
(�
(�
(�r��m�B�'�'�'�'�'�'�'�'�'�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(����
(�
(�
(�
(� (� (� (� (� (� (� (� (� (� (� (���� (� (� (� (�
����
�
���%�%�%�����2�7�7�9�9�-�-�-�-�-s5 �2B,�"B�=B,�
B �B,�B �B,�,B0�3B0c � �� K � t j � � }d}| � t � � 5 |� � � dz }t j |� � 4 �d {V ��} t j |� � 4 �d {V ��}t j d� � � d {V �� d d d � � �d {V �� n# 1 �d {V ��swxY w Y n# t j $ r d}� w xY wd d d � � �d {V �� n# 1 �d {V ��swxY w Y d d d � � n# 1 swxY w Y | � |� � | � |� � � � � | � |� � � � � d S �NFr r T)
r r r r r r r �CancelledErrorr r )r r"