Your IP : 216.73.216.213
a
XC?h� � @ s� d Z ddlZddlZddlZejdkr0e�d��ddlZddlZddlZddlm Z ddl
mZ dd� ZG d d
� d
ej
�ZG dd� dej
�Zed
kr�e�� dS )zTests for window_utils� NZwin32zWindows only)�
windows_utils)�supportc C s t �d � d S )N)�asyncioZset_event_loop_policy� r r �I/opt/alt/python39/lib64/python3.9/test/test_asyncio/test_windows_utils.py�tearDownModule s r c @ s e Zd Zdd� Zdd� ZdS )� PipeTestsc
C s� t jdd�\}}�zZt�� }| �|j� | �|jd� |�|d� | � |j� | �|jt
j� d}z|�� W n2 t
y� } z| �|j|� W Y d }~nd }~0 0 td��t�� }| �|j� | �|jd� |�|d� | �|jdt
jh� t
�|jgdd�}| �|t
j� | �|j� | �|j|� | �|j� | �|jdt
jh� | �|�� d� W t
�|� t
�|� nt
�|� t
�|� 0 d S ) N�TT�Z
overlappedr �d i� zexpected ERROR_IO_INCOMPLETEs helloF)r �pipe�_overlapped�
Overlapped�assertFalse�pending�assertEqual�error�ReadFile�
assertTrue�_winapiZERROR_IO_PENDING� getresult�OSError�winerror�RuntimeError� WriteFileZassertIn�WaitForMultipleObjects�event�
WAIT_OBJECT_0�CloseHandle)�selfZh1Zh2Zov1ZERROR_IO_INCOMPLETE�eZov2�resr r r �test_pipe_overlapped s<