File: D:/Python311/Lib/test/test_asyncio/__pycache__/test_windows_utils.cpython-311.pyc
�
��Vc � � � d Z ddlZddlZddlZej dk r ej d� � �ddlZddlZddlZddlm Z ddl
mZ d� Z G d� d ej
� � Z G d
� dej
� � Zedk r ej � � dS dS )
zTests for window_utils� N�win32zWindows only)�
windows_utils)�supportc �. � t j d � � d S )N)�asyncio�set_event_loop_policy� � �8D:\Python311\Lib\test\test_asyncio\test_windows_utils.py�tearDownModuler s � ��!�$�'�'�'�'�'r
c � � e Zd Zd� Zd� ZdS )� PipeTestsc � � t j d�� � \ }} t j � � }| � |j � � | � |j d� � |� |d� � | � |j � � | � |j t j � � d} |� � � t d� � �# t $ r%}| � |j |� � Y d }~nd }~ww xY wt j � � }| � |j � � | � |j d� � |� |d� � | � |j dt j h� � t j |j gdd� � }| � |t j � � | � |j � � | � |j |� � | � |j � � | � |j dt j h� � | � |� � � d� � t j |� � t j |� � d S # t j |� � t j |� � w xY w) N�TT��
overlappedr �d i� zexpected ERROR_IO_INCOMPLETEs helloF)r �pipe�_overlapped�
Overlapped�assertFalse�pending�assertEqual�error�ReadFile�
assertTrue�_winapi�ERROR_IO_PENDING� getresult�RuntimeError�OSError�winerror� WriteFile�assertIn�WaitForMultipleObjects�event�
WAIT_OBJECT_0�CloseHandle)�self�h1�h2�ov1�ERROR_IO_INCOMPLETE�e�ov2�ress r �test_pipe_overlappedzPipeTests.test_pipe_overlapped s� � ��#�|�<�<�<���B�! $��(�*�*�C����S�[�)�)�)����S�Y��*�*�*��L�L��S�!�!�!��O�O�C�K�(�(�(����S�Y��(@�A�A�A�"%��
C��
�
���� #�#A�B�B�B�� �
B�
B�
B�� � ���-@�A�A�A�A�A�A�A�A�����
B����
�(�*�*�C����S�[�)�)�)����S�Y��*�*�*��M�M�"�h�'�'�'��M�M�#�)�a��)A�%B�C�C�C��0�#�)��e�S�I�I�C����S�'�"7�8�8�8����S�[�)�)�)����S�Y�(;�<�<�<����S�[�)�)�)��M�M�#�)�a��)A�%B�C�C�C����S�]�]�_�_�h�7�7�7����#�#�#����#�#�#�#�#��
���#�#�#����#�#�#�#���s7 �BJ �:C �J �
D�'D�J �D�E"J �*Kc �j � t j d�� � \ }}t j |� � t j |� � }| � |� � � |� � | � |j |� � t j � � 5 t j
ddt � � ~t j
� � d d d � � n# 1 swxY w Y t j |� � t d� � �# t $ r&}| � |j d� � Y d }~d S d }~ww xY w)Nr r �ignore� zexpected ERROR_INVALID_HANDLE� )r r r r( �
PipeHandler �fileno�handle�warnings�catch_warnings�filterwarnings�ResourceWarningr �
gc_collectr r! r"