Sindbad~EG File Manager

Current Path : /usr/local/lib/python3.12/test/test_asyncio/__pycache__/
Upload File :
Current File : //usr/local/lib/python3.12/test/test_asyncio/__pycache__/test_proactor_events.cpython-312.pyc

�

(Μgv�����dZddlZddlZddlZddlZddlmZddlZddlmZddlm	Z	ddlm
Z
ddlmZddlmZdd	l
mZdd
l
mZddlmZd�Zd
�ZGd�dej*�ZGd�dej*�ZGd�dej*�Zej2ej4dk7d�Gd�dej*��Zedk(rej:�yy)zTests for proactor_events.py�N)�mock)�BaseProactorEventLoop)�_ProactorSocketTransport)�_ProactorWritePipeTransport)�_ProactorDuplexPipeTransport)�_ProactorDatagramTransport)�	os_helper)�
socket_helper)�utilsc�.�tjd�y�N)�asyncio�set_event_loop_policy���C/usr/local/lib/python3.12/test/test_asyncio/test_proactor_events.py�tearDownModulers���!�!�$�'rc�`�|j�y|jj�d|_yr
)�_sock�close)�	transports r�close_transportrs(�������
�O�O�����I�Orc����eZdZ�fd�Zd/d�Zd�Zd�Zd�Zeje
jjd�d��Z
d�Zd	�Zd
�Zd�Zd�Zd
�Zd�Zd�Zd�Zej0d�d��Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z ej0d�d��Z!d�Z"d�Z#d�Z$d�Z%d �Z&d!�Z'd"�Z(d#�Z)d$�Z*d%�Z+d&�Z,d'�Z-d(�Z.d)�Z/d*�Z0d+�Z1d,�Z2d-�Z3d.�Z4�xZ5S)0�ProactorSocketTransportTestsc���t�|��|j�|_|j	|jj
�t
j�|_|j|j_	tjtj�|_t
jtj�|_d|_y)Ni)�super�setUp�
new_test_loop�loop�
addCleanuprr�Mock�proactor�	_proactor�
test_utils�make_test_protocolr�Protocol�protocol�socket�sock�buffer_size��self�	__class__s �rrz"ProactorSocketTransportTests.setUp#s����
��
���&�&�(��	�����	�	���(��	�	���
�"�m�m��	�	��"�5�5�g�6F�6F�G��
��I�I�f�m�m�,��	� ��rc��t|j|j|j|��}|j	t
|�|S�N)�waiter)rrr)r'r r)r,r0rs   r�socket_transportz-ProactorSocketTransportTests.socket_transport-s6��,�T�Y�Y��	�	�-1�]�]�6�K�	������3��rc��|jj�}|j|��}tj|j�|j|j
��|jj|�|jjj|jt|j��yr/)r�
create_futurer1r$�run_briefly�assertIsNone�resultr'�connection_mader"�	recv_into�assert_called_withr)�	bytearrayr*�r,�fut�trs   r�	test_ctorz&ProactorSocketTransportTests.test_ctor3s����i�i�%�%�'��
�
"�
"�#�
"�
.�����t�y�y�)����#�*�*�,�'��
�
�%�%�b�)��
�
���2�2�4�9�9�i��HX�HX�>Y�Zrc��|j�}|j�|jjjj|jt|j��|j|jjj�|j|jjj�yr
)r1�
_loop_readingrr#r8r9r)r:r*�assertFalser'�
data_received�called�eof_received�r,r=s  r�test_loop_readingz.ProactorSocketTransportTests.test_loop_reading;s���
�
"�
"�
$��
�����	�	���%�%�8�8����I�d�N^�N^�D_�`�������4�4�;�;�<�������3�3�:�:�;rc�v�d}|jj�}|jt|��|j	�}||_||jdt|�|j|�t|j�}||dt|�|jjjj|j|�|jjj|�|j!|jjj"j$dt&�y)N�datar)rr3�
set_result�lenr1�	_read_fut�_datar@r:r*r#r8r9r)r'rB�assertIsInstance�	call_args�args�bytes)r,�buf�resr=�
called_bufs     r�test_loop_reading_dataz3ProactorSocketTransportTests.test_loop_reading_dataBs������i�i�%�%�'�����s�3�x� �
�
"�
"�
$�����!�����#�c�(��
������t�/�/�0�
� #�
�9�C��H���	�	���%�%�8�8����J�O��
�
�#�#�6�6�s�;�	
���d�m�m�9�9�C�C�H�H��K�U�Sr�)Assertions are disabled in optimized modec�8�|jj�}|jd�|j�}|j	t
|j|�tj�|_	||_
|j
|�|j|jjjj�|j|j j"j�|j|jj�y�Nr)rr3rIr1�assertRaises�AssertionErrorr@rr!rrKrAr#r8rC�
assertTruer'rD�r,rRr=s   r�test_loop_reading_no_dataz6ProactorSocketTransportTests.test_loop_reading_no_dataSs����i�i�%�%�'�����q��
�
"�
"�
$�����.�"�*:�*:�C�@��9�9�;������
�����������,�,�6�6�=�=�>�����
�
�2�2�9�9�:���������(rc��t�x}|jjj_|j�}t
j�|_|j�|jj|d�y�Nz"Fatal read error on pipe transport)�ConnectionAbortedErrorrr#r8�side_effectr1rr!�_fatal_errorr@r9�r,�errr=s   r�test_loop_reading_abortedz6ProactorSocketTransportTests.test_loop_reading_abortedbsb��:P�:R�R��d�i�i�!�!�+�+�7�
�
"�
"�
$���)�)�+���
����
���*�*��@�	Brc�(�t�|jjj_|j�}d|_tj�|_	|j�|j|jj�y�NT)
r_rr#r8r`r1�_closingrr!rar@rArCrEs  r�!test_loop_reading_aborted_closingz>ProactorSocketTransportTests.test_loop_reading_aborted_closinglsc��4J�4L��	�	���%�%�1�
�
"�
"�
$������)�)�+���
����������/�/�0rc�(�t�|jjj_|j�}d|_tj�|_	|j�|j|jj�y�NF)
r_rr#r8r`r1rgrr!rar@rZrCrEs  r�"test_loop_reading_aborted_is_fatalz?ProactorSocketTransportTests.test_loop_reading_aborted_is_fatalusa��4J�4L��	�	���%�%�1�
�
"�
"�
$������)�)�+���
����������.�.�/rc��t�x}|jjj_|j�}d|_tj�|_	tj�|_
|j�|j|jj�|jj|�yrj)�ConnectionResetErrorrr#r8r`r1rgrr!ra�_force_closer@rArCr9rbs   r�!test_loop_reading_conn_reset_lostz>ProactorSocketTransportTests.test_loop_reading_conn_reset_lost}s���:N�:P�P��d�i�i�!�!�+�+�7�
�
"�
"�
$������)�)�+����)�)�+���
����������/�/�0�
���*�*�3�/rc��t�x}|jjj_|j�}t
j�|_|j�|jj|d�yr^)�OSErrorrr#r8r`r1rr!rar@r9rbs   r�test_loop_reading_exceptionz8ProactorSocketTransportTests.test_loop_reading_exception�sa��;B�9�E��d�i�i�!�!�+�+�7�
�
"�
"�
$���)�)�+���
����
���*�*��@�	Brc���|j�}tj�|_|j	d�|j|jd�|jjd��y)NrH)�data)r1rr!�
_loop_writing�write�assertEqual�_bufferr9rEs  r�
test_writez'ProactorSocketTransportTests.test_write�sU��
�
"�
"�
$���9�9�;���
�����������T�*�
���+�+��+�9rc�|�|j�}|jd�|j|j�y)Nr)r1rvrArxrEs  r�test_write_no_dataz/ProactorSocketTransportTests.test_write_no_data�s-��
�
"�
"�
$��
����
�������$rc�,�|j�}tj�|_tj�|_|jd�|j
|jd�|j|jj�y�NrH)
r1rr!�
_write_futrurvrwrxrArCrEs  r�test_write_morez,ProactorSocketTransportTests.test_write_more�se��
�
"�
"�
$���	�	���
��9�9�;���
�����������W�-�����)�)�0�0�1rc�r�|j�}td�|_|j�|jj
jj|jd�|jj
jjjj|j�yr})r1r:rxrurr#�sendr9r)�return_value�add_done_callbackrEs  r�test_loop_writingz.ProactorSocketTransportTests.test_loop_writing�s|��
�
"�
"�
$���w�'��
�
�����	�	��� � �3�3�D�I�I�w�G��	�	��� � �-�-�?�?���r�/�/�0r�asyncio.proactor_events.loggerc�D�t�x}|jjj_|j�}t
j�|_ddg|_	|j�|jj|d�d|_|jd�|jd�|jd�|jd�|jd�|j|jd�|jjd�y)Nsdastaz#Fatal write error on pipe transport�rHzsocket.send() raised exception.)rqrr#r�r`r1rr!rarxrur9�
_conn_lostrvrw�warning)r,�m_logrcr=s    r�test_loop_writing_errz2ProactorSocketTransportTests.test_loop_writing_err�s���5<�Y�>��d�i�i�!�!�&�&�2�
�
"�
"�
$���)�)�+����U�^��
�
����
���*�*��A�	C���
�
�����
�����
�����
�����
�����������T�*�
�
�
�(�(�)J�Krc���|jj�}|jd�|j�}||_|j|�|j
|j�yr})rr3rIr1r~rur5r;s   r�test_loop_writing_stopz3ProactorSocketTransportTests.test_loop_writing_stop�sU���i�i�%�%�'�����w��
�
"�
"�
$����
�
��������"�-�-�(rc��|jj�}|jd�|j�}||_|j�|j
|�|j|j�tj|j�|jjjd�y�Nr�)
rr3rIr1r~rrur5r$r4r'�connection_lostr9r;s   r�test_loop_writing_closingz6ProactorSocketTransportTests.test_loop_writing_closing�s����i�i�%�%�'�����q��
�
"�
"�
$����
�
���
�
��������"�-�-�(����t�y�y�)��
�
�%�%�8�8��>rc��|j�}tj�|_|j	�|jjd�yr
)r1rr!rn�abortr9rEs  r�
test_abortz'ProactorSocketTransportTests.test_abort�s8��
�
"�
"�
$���)�)�+���
���
�
���*�*�4�0rc�F�|j�}|j�tj|j�|j
jjd�|j|j��|j|jd�|j
jj�|j�tj|j�|j|j
jj�yr�)r1rr$r4rr'r�r9rZ�
is_closingrwr��
reset_mockrArCrEs  r�
test_closez'ProactorSocketTransportTests.test_close�s���
�
"�
"�
$��
���
����t�y�y�)��
�
�%�%�8�8��>�����
�
��(��������*��
�
�%�%�0�0�2�
���
����t�y�y�)�������6�6�=�=�>rc��|j�}tj�|_|j	�tj|j�|j|jjj�yr
)r1rr!r~rr$r4rrAr'r�rCrEs  r�test_close_write_futz1ProactorSocketTransportTests.test_close_write_fut�sV��
�
"�
"�
$���	�	���
�
���
����t�y�y�)�������6�6�=�=�>rc���|j�}dg|_|j�tj|j
�|j
|jjj�yr})
r1rxrr$r4rrAr'r�rCrEs  r�test_close_bufferz.ProactorSocketTransportTests.test_close_buffer�sR��
�
"�
"�
$���Y��
�
���
����t�y�y�)�������6�6�=�=�>rc�`�|j�}d|jj_|j	�tj|j�|jjjd�|j|jjj�y)N���)r1r)�filenor�rr$r4rr'r�r9rA�shutdownrCrEs  r�test_close_invalid_sockobjz7ProactorSocketTransportTests.test_close_invalid_sockobj�ss��
�
"�
"�
$��(*��	�	���%�
���
����t�y�y�)��
�
�%�%�8�8��>�������+�+�2�2�3r�asyncio.base_events.loggerc��|j�}tj�|_|j	d�|j|jj�|j|jj�yr
)r1rr!rnrarZrC�error)r,�	m_loggingr=s   r�test_fatal_errorz-ProactorSocketTransportTests.test_fatal_errorsU��
�
"�
"�
$���)�)�+���
�����������.�.�/����	���.�.�/rc�"�|j�}dg|_tj�x}|_tj�x}|_|j
d�|jj�|jj�tj|j�|jjjd�|jd|j�|j|jd�y)NrHr�)r1rxrr!rKr~rn�cancelr9r$r4rr'r�rwr�)r,r=�read_fut�	write_futs    r�test_force_closez-ProactorSocketTransportTests.test_force_closes���
�
"�
"�
$���Y��
�"&�)�)�+�-��2�<�$(�I�I�K�/�	�B�M�
��������*�*�,����+�+�-����t�y�y�)��
�
�%�%�8�8��>�����r�z�z�*��������*rc��tj�}|jj|�|jj	�}|jd�||jj_|j�}|jd�|jd�tj|j�|j�y)Nr�rH)rr!r�set_exception_handlerr3rIr"r�r�r1rvrnr$r4�assert_not_called)r,�exc_handlerr<r=s    r�test_loop_writing_force_closez:ProactorSocketTransportTests.test_loop_writing_force_closes����i�i�k���	�	�'�'��4��i�i�%�%�'�����q��*-��
�
���'�
�
"�
"�
$��
�����
��������t�y�y�)��%�%�'rc���|j�}d|_|jd�tj|j
�|j
|jjj�yrf)
r1rgrnr$r4rrZr'r�rCrEs  r�test_force_close_idempotentz8ProactorSocketTransportTests.test_force_close_idempotent#sS��
�
"�
"�
$�����
��������t�y�y�)�	
����
�
�5�5�<�<�=rc�r�|j�}|j|jjj�d|_|j
d�|j
d�tj|j�|jd|jjj�y)NTr�)r1rAr'r�rCrgrnr$r4rrw�
call_countrEs  r�.test_force_close_protocol_connection_lost_oncezKProactorSocketTransportTests.test_force_close_protocol_connection_lost_once/s���
�
"�
"�
$��������6�6�=�=�>����	�����
��������t�y�y�)�����D�M�M�9�9�D�D�Erc�`�|j�}|j|jjj�|j�|j�t
j|j�|jd|jjj�yr�)r1rAr'r�rCrr$r4rrwr�rEs  r�(test_close_protocol_connection_lost_oncezEProactorSocketTransportTests.test_close_protocol_connection_lost_once:st��
�
"�
"�
$��������6�6�=�=�>�	���
�
���
����t�y�y�)�����D�M�M�9�9�D�D�Erc��|j�}dg|_|jd�tj|j
�|jjjd�|jd|j�yr})
r1rxrnr$r4rr'r�r9rwrEs  r�test_fatal_error_2z/ProactorSocketTransportTests.test_fatal_error_2Dsc��
�
"�
"�
$���Y��
�
��������t�y�y�)��
�
�%�%�8�8��>�����r�z�z�*rc��|j�}|jd�|j|jjj
�|j|jjj
�yr
)r1�_call_connection_lostrZr'r�rCr)rrEs  r�test_call_connection_lostz6ProactorSocketTransportTests.test_call_connection_lostMsT��
�
"�
"�
$��
� � ��&�����
�
�5�5�<�<�=�����	�	���.�.�/rc��|j�}|j|j��|j�|jj
j
tj�|j�|j|jj
jd�|j�yr�)r1rZ�
can_write_eof�	write_eofr)r�r9r(�SHUT_WRrwr�rrEs  r�test_write_eofz+ProactorSocketTransportTests.test_write_eofSs|��
�
"�
"�
$������(�(�*�+�
�����	�	���-�-�f�n�n�=�
����������+�+�6�6��:�
���
rc���|j�}|jj�}||jjj
_|jd�|j�|j|j�|j|jjj�|jjj
j|jd�|j!d�|jj#�|jjjt$j&�|j)�y�NrH�)r1rr3�_loopr#r�r�rvr�rZ�_eof_writtenrAr)r�rCr9rI�	_run_oncer(r�r�r,r=�fs   r�test_write_eof_bufferz2ProactorSocketTransportTests.test_write_eof_buffer\s���
�
"�
"�
$���I�I�#�#�%��/0��������,�
�����
����������(�������+�+�2�2�3�
�������2�2�4�9�9�g�F�	���Q���	�	�����	�	���-�-�f�n�n�=�
���
rc��t|j|j|j�}|j	|j��|j
�|j	|j��|jj�|j	|jjj�|j�yr
)rrr)r'rZr�r�r�r�rrCrEs  r�test_write_eof_write_pipez6ProactorSocketTransportTests.test_write_eof_write_pipejs���
(��I�I�t�y�y�$�-�-�1������(�(�*�+�
��������
�
��(��	�	��������	�	���.�.�/�
���
rc�2�t|j|j|j�}|jj	�}||j
jj_|jd�|j�|j|j��|j|jjj�|j
jjj!|jd�|j#d�|jj%�|jj%�|j|jj&j�|j'�yr�)rrr)r'r3r�r#r�r�rvr�rZr�rAr�rCr9rIr�rr�s   r� test_write_eof_buffer_write_pipez=ProactorSocketTransportTests.test_write_eof_buffer_write_pipets���
(����D�I�I�t�}�}�
M���I�I�#�#�%��/0��������,�
�����
��������
�
��(�������+�+�2�2�3�
�������2�2�4�9�9�g�F�	���Q���	�	�����	�	��������	�	���.�.�/�
���
rc�"�t|j|j|j�}|j	|j��|j
t�5|j�ddd�t|�y#1swY�xYwr
)
rrr)r'rAr�rX�NotImplementedErrorr�rrEs  r�test_write_eof_duplex_pipez7ProactorSocketTransportTests.test_write_eof_duplex_pipe�sd��
)��I�I�t�y�y�$�-�-�1������)�)�+�,�
�
�
�2�
3��L�L�N�4����4�
3�s� B�Bc�����j�}d}gd�}tt|�����fd�}|�jjj
_�jj��j|j��j|j��|ddD]J}�jj��jjjt|���L|j!�|j!��j|j��j|j��t#d�D]}�jj���jjjt|d��|j%�|j%��j|j��j|j��|ddD]J}�jj��jjjt|���L|j!�|j%�t'j(��j_�jj��jj*j-��jjjt|d��|j/��j|j��y)Nr)�data1�data2sdata3sdata4sdata5rc��������jj�}�j��|j����fd�}||_|j	t���|S)Nc�.����dt����Sr
)rJ)rt�msgr6s���r�monkeyzYProactorSocketTransportTests.test_pause_resume_reading.<locals>.recv_into.<locals>.monkey�s���"%��Y�c�#�h���x�r)rr3�popr6rIrJ)r)rtr�r�r�r6�
reversed_msgsr,s `  @@��rr8zIProactorSocketTransportTests.test_pause_resume_reading.<locals>.recv_into�sO����	�	�'�'�)�A��#�#�%�C��X�X�F�
 ��A�H�
�L�L��S��"��Hr��
r�r�)r1�list�reversedrr#r8r`r�rA�_pausedrZ�
is_readingr'rBr9r:�
pause_reading�range�resume_readingrr!�call_exception_handlerr�r)r,r=�index�msgsr8r��ir�s`      @r�test_pause_resume_readingz6ProactorSocketTransportTests.test_pause_resume_reading�s=���
�
"�
"�
$����F���X�d�^�,�
�	�5>��	�	���%�%�1��	�	����������$�����
�
��(����8�C��I�I���!��M�M�'�'�:�:�9�S�>�J��	����
��������
�
�#��������)��r��A��I�I���!���
�
�#�#�6�6�y��a��7I�J�
����
����������$�����
�
��(���!�9�C��I�I���!��M�M�'�'�:�:�9�S�>�J��	����
����+/�9�9�;��	�	�(��	�	�����	�	�(�(�:�:�<��
�
�#�#�6�6�y��a��7I�J�
���
��������)rc����|j���fd�|jj_t	j
|j�|j�j��|jjd��j�|j�j���j�|j�j��y)Nc�$���j�Sr
)r�)�_r=s �r�<lambda>zQProactorSocketTransportTests.test_pause_reading_connection_made.<locals>.<lambda>�s���b�>N�>N�>Pr�)
r1r'r7r`r$r4rrAr��assert_no_readerr�rZrrEs @r�"test_pause_reading_connection_madez?ProactorSocketTransportTests.test_pause_reading_connection_made�s����
�
"�
"�
$��4P��
�
�%�%�1����t�y�y�)��������)��	�	�"�"�1�%�
��������
�
��(�
���
��������)rc�F�|j�}|j|��|j|j�d�|j	|j
jj�|j	|j
jj�|S)N��highr)	r1�set_write_buffer_limitsrw�get_write_buffer_sizerAr'�
pause_writingrC�resume_writing)r,r�r=s   r�pause_writing_transportz4ProactorSocketTransportTests.pause_writing_transport�s{��
�
"�
"�
$��
�"�"��"�-�����1�1�3�Q�7�������4�4�;�;�<�������5�5�<�<�=��	rc�N�|jd��}|jj�}||jjj_|j
d�|jj�|j|jjj�|jd�|jj�|j|j�d�|j|jjj�y)Nr�r�s
large datar)r�rr3r#r�r�rvr�rZr'r�rCrIrwr�r��r,r=r<s   r�test_pause_resume_writingz6ProactorSocketTransportTests.test_pause_resume_writing�s���
�
)�
)�q�
)�
1���i�i�%�%�'��03��	�	��� � �-�
������	�	��������
�
�3�3�:�:�;�	���t���	�	��������1�1�3�Q�7�����
�
�4�4�;�;�<rc��|jd��}|jj�}||jjj_|j
d�|jj�|j|j�d�|j|jjj�|j
d�|jj�|j|j�d�|j|jjj�y)Nr�r�s123��abc��r�rr3r#r�r�rvr�rwr�rAr'r�rCrZ)r,r=�fut1s   r�test_pause_writing_2writez6ProactorSocketTransportTests.test_pause_writing_2write�s���
�
)�
)�q�
)�
1���y�y�&�&�(��04��	�	��� � �-�
������	�	��������1�1�3�Q�7�������4�4�;�;�<�	������	�	��������1�1�3�Q�7�����
�
�3�3�:�:�;rc��|jd��}|jj�}||jjj_|j
d�|jj�|j|j�d�|j|jjj�|j
d�|jj�|j|j�d�|j|jjj�|j
d�|jj�|j|j�d�|j|jjj�y)	Nr�r��1r�s23r�r�r�r�r�s   r�test_pause_writing_3writez6ProactorSocketTransportTests.test_pause_writing_3write�s:��
�
)�
)�q�
)�
1���i�i�%�%�'��03��	�	��� � �-�
������	�	��������1�1�3�Q�7�������4�4�;�;�<�	������	�	��������1�1�3�Q�7�������4�4�;�;�<�	������	�	��������1�1�3�Q�7�����
�
�3�3�:�:�;rc��|jd��}|jj�}|jd�||jjj
_|jd�|jj�|j|j�d�|j|jjj�y)Nr�r�svery large datar)r�rr3rIr#r�r�rvr�rwr�rAr'r�rCr�s   r�test_dont_pause_writingz4ProactorSocketTransportTests.test_dont_pause_writings���
�
)�
)�q�
)�
1���i�i�%�%�'�����t��03��	�	��� � �-�
���#�$��	�	��������1�1�3�Q�7�������4�4�;�;�<rr
)6�__name__�
__module__�__qualname__rr1r>rFrT�unittest�skipIf�sys�flags�optimizer\rdrhrkrorrryr{rr�r�patchr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrr�
__classcell__�r-s@rrr!sA���!��[�<�T�"�X�_�_�S�Y�Y�'�'�)T�U�)�V�)�B�1�0�	0�B�:�%�
2�1��T�Z�Z�0�1�L�2�L�&)�
?�1�?�?�?�4��T�Z�Z�,�-�0�.�0�+�(�
>�	F�F�+�0����
��5*�n*��=� <�"<�.=rrc����eZdZ�fd�Zdd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zejd
�d��Zd�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zejd�d��Z�xZS)�ProactorDatagramTransportTestsc���t�|��|j�|_t	j
�|_|j|j_tjtj�|_t	j
tj��|_d|jj_y)N)�spec_setr�)rrrrrr!r"r#r$r%r�DatagramProtocolr'r(r)r�r�r+s �rrz$ProactorDatagramTransportTests.setUp!sw���
��
���&�&�(��	��	�	���
�"�m�m��	�	��"�5�5�g�6N�6N�O��
��I�I�v�}�}�5��	�()��	�	���%rc���|rdnt|jj_t	|j
|j|j|��}|jt|�|S)N��address)	rqr)�getpeernamer`rrr'r r)r,rrs   r�datagram_transportz1ProactorDatagramTransportTests.datagram_transport*sO��4;�D���	�	���)�.�t�y�y�$�)�)�/3�}�}�7>�@�	�	
�����3��rc��d}|j�}|j|d�|j|jjj�|jjj|j|d��y�NrH)�0.0.0.0i���addr)r�sendtorZr"rCr9r)�r,rtrs   r�test_sendtoz*ProactorDatagramTransportTests.test_sendto2sk�����+�+�-�	�����0�1�����
�
�,�,�3�3�4��
�
���/�/��I�I�t�"3�	0�	5rc� �td�}|j�}|j|d�|j|jjj
�|jjj
|jdd��yr)r:rr!rZr"rCr9r)r"s   r�test_sendto_bytearrayz4ProactorDatagramTransportTests.test_sendto_bytearray:sp����!���+�+�-�	�����0�1�����
�
�,�,�3�3�4��
�
���/�/��I�I�w�%6�	0�	8rc� �td�}|j�}|j|d�|j|jjj
�|jjj
|jdd��yr)�
memoryviewrr!rZr"rCr9r)r"s   r�test_sendto_memoryviewz5ProactorDatagramTransportTests.test_sendto_memoryviewBsp���'�"���+�+�-�	�����0�1�����
�
�,�,�3�3�4��
�
���/�/��I�I�w�%6�	0�	8rc�(�|j�}|jjd�|jdd�|j	|j
jj�|jdgt|j��y)N)rH�ri90rr)	rrx�appendr!rAr)rCrwr��r,rs  r�test_sendto_no_dataz2ProactorDatagramTransportTests.test_sendto_no_dataJsu���+�+�-�	���� � �!>�?�����b�!�������)�)�0�0�1����
*�+�T�)�2C�2C�-D�	Frc�H�|j�}|jjd�t�|_|jdd�|j
|jj
j�|jddgt|j��y)N�r�r*r�r*�r�r*)rrxr+�objectr~r!rAr"rCrwr�r,s  r�test_sendto_bufferz1ProactorDatagramTransportTests.test_sendto_bufferRs����+�+�-�	���� � �!?�@�%�x�	������#5�6�������-�-�4�4�5����
+�
+�
-���"�"�#�	%rc��td�}|j�}|jjd�t	�|_|j
|d�|j|jjj�|jddgt|j��|j|jddt�y�Nr�r/r*r0r�r)r:rrxr+r1r~r!rAr"rCrwr�rMrP�r,�data2rs   r�test_sendto_buffer_bytearrayz;ProactorDatagramTransportTests.test_sendto_buffer_bytearray]s����(�#���+�+�-�	���� � �!?�@�%�x�	������ 2�3�������-�-�4�4�5����
+�
+�
-���"�"�#�	%�	
���i�/�/��2�1�5�u�=rc��td�}|j�}|jjd�t	�|_|j
|d�|j|jjj�|jddgt|j��|j|jddt�yr4)r'rrxr+r1r~r!rAr"rCrwr�rMrPr5s   r�test_sendto_buffer_memoryviewz<ProactorDatagramTransportTests.test_sendto_buffer_memoryviewjs����8�$���+�+�-�	���� � �!?�@�%�x�	������ 2�3�������-�-�4�4�5����
+�
+�
-���"�"�#�	%�	
���i�/�/��2�1�5�u�=rr�c�F�d}t�x}|jj_|j	�}tj�|_|j|d�|j|jj�|jj|d�d|_d|_|j|�|j|�|j|�|j|�|j|�|jjd�y)NrHr�'Fatal write error on datagram transportr�)�123z!socket.sendto() raised exception.)�RuntimeErrorr"r!r`rrr!rarZrCr9r��_addressr�)r,r�rtrcrs     r�test_sendto_exceptionz4ProactorDatagramTransportTests.test_sendto_exceptionws�����1=��?��d�m�m�"�"�.��+�+�-�	�!%����	������r�"����	�.�.�5�5�6����1�1�#&�#L�	N� !�	��%�	���������������������������
�
�
�(�(�)L�Mrc�>�d}t|jj_|j	�}tj�|_|j|d�|j|jd�|j|jj�y)NrHrr)�ConnectionRefusedErrorr)r!r`rrr!rarwr�rArCr"s   r�test_sendto_error_receivedz9ProactorDatagramTransportTests.test_sendto_error_received�su����'=��	�	���$��+�+�-�	�!%����	������r�"�����-�-�q�1�����/�/�6�6�7rc�f�d}t|jj_|j	d��}tj�|_|j|�|j|jj�|j|jjj�y)NrH�rr�r)rAr"r�r`rrr!rar!rArCrZr'�error_receivedr"s   r�$test_sendto_error_received_connectedzCProactorDatagramTransportTests.test_sendto_error_received_connected�s~����)?��
�
���&��+�+�N�+�C�	�!%����	�����������/�/�6�6�7�����
�
�4�4�;�;�<rc�h�|j�}|jt|jdd�y)N�strr)rrX�	TypeErrorr!r,s  r�test_sendto_strz.ProactorDatagramTransportTests.test_sendto_str�s*���+�+�-�	����)�Y�%5�%5�u�b�Arc�l�|jd��}|jt|jdd�y)NrDrsstr)rr�)rrX�
ValueErrorr!r,s  r�test_sendto_connected_addrz9ProactorDatagramTransportTests.test_sendto_connected_addr�s3���+�+�N�+�C�	�����	�(�(�&�.�	Brc���|jd��}|j�|j|jd�|j	dd�|j|jd�y)N)r�rr�rHr�)rrrwr�r!r,s  r�test_sendto_closingz2ProactorDatagramTransportTests.test_sendto_closing�s[���+�+�D�+�9�	���������-�-�q�1�����$�'�����-�-�q�1rc�X�|j�}d|_|j�|j|j�tj|j�|jjj�|jjjd�yrf)
rrgrur5r~r$r4rr)rr9r'r�r,s  r�test__loop_writing_closingz9ProactorDatagramTransportTests.test__loop_writing_closing�sv���+�+�-�	�!�	�����!����)�.�.�/����t�y�y�)��	�	���*�*�,��
�
�%�%�8�8��>rc�.�t�x}|jj_|j	�}tj�|_|jjd�|j�|jj|d�y)N�rHrr;)r=r"r!r`rrr!rarxr+rur9)r,rcrs   r�test__loop_writing_exceptionz;ProactorDatagramTransportTests.test__loop_writing_exception�sr��1=��?��d�m�m�"�"�.��+�+�-�	�!%����	����� � ��/����!����1�1�#&�#L�	Nrc�4�t|jj_|j	�}tj�|_|jjd�|j�|j|jj�y)NrS)
rAr"r!r`rrr!rarxr+rurArCr,s  r�!test__loop_writing_error_receivedz@ProactorDatagramTransportTests.test__loop_writing_error_received�sj��+A��
�
���(��+�+�-�	�!%����	����� � ��/����!�����/�/�6�6�7rc��t|jj_|j	d��}tj�|_|jjd�|j�|j|jj�|j|jjj�y)NrDrrS)rAr"r�r`rrr!rarxr+rurArCrZr'rEr,s  r�,test__loop_writing_error_received_connectionzKProactorDatagramTransportTests.test__loop_writing_error_received_connection�s���)?��
�
���&��+�+�N�+�C�	�!%����	����� � ��/����!�����/�/�6�6�7�����
�
�4�4�;�;�<rz asyncio.base_events.logger.errorc���|jd��}t�}|j|�|j|jj
j�|j�y)NrDr)rrArarAr'rErCr�)r,�m_excrrcs    r�test_fatal_error_connectedz9ProactorDatagramTransportTests.test_fatal_error_connected�sU���+�+�N�+�C�	�$�&�����s�#�������5�5�<�<�=�
���!rr
)rrr	rrr#r%r(r-r2r7r9rrr?rBrFrJrMrOrQrTrVrXr[rrs@rrrs����*��5�8�8�F�	%�>�>��T�Z�Z�0�1�N�2�N�,
8�
=�B�B�
2�?�
N�8�	=��T�Z�Z�2�3�"�4�"rrc�>��eZdZ�fd�Zej
d�d��Zd�Zd�Zd�Z	d�Z
d�Zd	�Zd
�Z
d�Zej
d�d
��Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zej0ej4j6d�d��Zd�Zd�Z�xZS)�BaseProactorEventLoopTestsc�.��t�|��tj�|_tj�|_tj�tj�c|_|_	tjd|j|jf��5tjd�5t|j�|_ddd�ddd�|j|j�y#1swY�-xYw#1swY�1xYw)N�)asyncio.proactor_events.socket.socketpair)r��signal.set_wakeup_fd)rrr$�mock_nonblocking_socketr)rr!r"�ssock�csockrrr�set_event_loopr+s �rrz BaseProactorEventLoopTests.setUp�s����
��
���6�6�8��	��	�	���
�!%����d�i�i�k���
�D�J�
�Z�Z�C�&*�j�j�$�*�*�%=�?����2�3�1�$�-�-�@��	�4�?�	
���D�I�I�&�4�3��?�?�s$�"D�8C?�D�?D	�D�Dr_c��tj�tj�fx\}}|_tjd�5t	|j
�}ddd�|j
j|�|j
|j|�|j|jd�|j�y#1swY�nxYw)Nr`r�)rr!r�rrr"�assertIs�_ssock�_csockrw�
_internal_fdsr)r,�
socketpairrbrcrs     rr>z$BaseProactorEventLoopTests.test_ctor�s���
�I�I�K�����2&�	&���u�z�.�
�Z�Z�.�
/�(����7�D�0��
�
�d�k�k�5�)��
�
�d�k�k�5�)�����+�+�Q�/��
�
��0�
/�s�C�Cc��|jj�|j|jjd�|j	|j
jj�|j	|jjj�|j|jj�|j|jj�d|j_y)NrT)
r�_close_self_piperwrirZrbrrCrcr5rgrh�_closed�r,s r�test_close_self_pipez/BaseProactorEventLoopTests.test_close_self_pipes����	�	�"�"�$�������0�0�!�4�����
�
�(�(�/�/�0�����
�
�(�(�/�/�0����$�)�)�*�*�+����$�)�)�*�*�+�!��	�	�rc�^�tj�|j_|jj	�|j|jjj�|j|jjj�|j|jj�|jjj�|jj	�|j|jjj�yr
)rr!rrlrrZrCr"r5r#r�rArns rr�z%BaseProactorEventLoopTests.test_closes���%)�Y�Y�[��	�	�"��	�	��������	�	�2�2�9�9�:�����
�
�+�+�2�2�3����$�)�)�-�-�.��	�	�"�"�-�-�/��	�	����������3�3�:�:�;rc��|jj|jtj��}|j|t�t|�yr
)r�_make_socket_transportr)rr&rMrrrEs  r�test_make_socket_transportz5BaseProactorEventLoopTests.test_make_socket_transports>��
�Y�Y�
-�
-�d�i�i��9I�9I�9K�
L�����b�":�;���rc�2�|jj�|jjj	|j
d�|jjjjj	|jj�y�Ni)r�_loop_self_readingr"�recvr9rbr�r�rns r�test_loop_self_readingz1BaseProactorEventLoopTests.test_loop_self_readingsa���	�	�$�$�&��
�
���-�-�d�j�j�$�?��
�
���'�'�9�9�L�L��I�I�(�(�	*rc���tj�}||j_|jj	|�|j|jj�|jjj|jd�|jjjjj|jj�yru)rr!r�_self_reading_futurervrZr6rCr"rwr9rbr�r�)r,r<s  r�test_loop_self_reading_futz5BaseProactorEventLoopTests.test_loop_self_reading_fut%s����i�i�k��),��	�	�&��	�	�$�$�S�)�����
�
�)�)�*��
�
���-�-�d�j�j�$�?��
�
���'�'�9�9�L�L��I�I�(�(�	*rc�"�tj�|j_t	�|j
j_|jj�|j|jjj�yr
)rr!rr�rqr"rwr`rvrZrCrns r� test_loop_self_reading_exceptionz;BaseProactorEventLoopTests.test_loop_self_reading_exception.sT��+/�9�9�;��	�	�(�)0���
�
���&��	�	�$�$�&�����	�	�8�8�?�?�@rc��|jj�|jjj	d�y)N�)r�_write_to_selfrcr�r9rns r�test_write_to_selfz-BaseProactorEventLoopTests.test_write_to_self4s(���	�	� � �"��
�
���*�*�5�1rc�:�|jjg�yr
)r�_process_eventsrns r�test_process_eventsz.BaseProactorEventLoopTests.test_process_events8s���	�	�!�!�"�%rr�c���tj�}tj�x}|j_|jj	||j
�|j
|j�|jdd}|�|jjj|j
�tj�}tj�tj�f|j_
tj�x}|j_||�|j
|jj�|j
|j�t�|j_||�|j
|j
j"j�|j
|j$j�yrW)rr!r�	call_soon�_start_servingr)rZrCrNr"�acceptr9r6r�rrrqr`rr�)r,r��pfr�rr<�make_trs       r�test_create_serverz-BaseProactorEventLoopTests.test_create_server;s;��
�Y�Y�[��*.�)�)�+�5�	�D�I�I�'��	�	� � ��T�Y�Y�/����	�(�(�)��"�"�1�%�a�(�����
�
���/�/��	�	�:��i�i�k��#'�9�9�;��	�	��"<��
�
��59�Y�Y�[�@��$�)�)�2��S�	�����
�
�)�)�*�������'�")���
�
���S�	�����	�	���.�.�/�������*�*�+rc��tj�}tj�x}|j_|jj	||j
�|jdd}|jj�}|j�||�|j|j
jj�yrW)rr!rr�r�r)rNr3r�rZrrC)r,r�r�rr<s     r�test_create_server_cancelz4BaseProactorEventLoopTests.test_create_server_cancelWs���
�Y�Y�[��*.�)�)�+�5�	�D�I�I�'��	�	� � ��T�Y�Y�/��"�"�1�%�a�(���i�i�%�%�'���
�
���S�	�����	�	���.�.�/rc��tj�}tj�}tj�}tj�}|j�||j�|i|j_|jj|�|j
|jj�|j
|jj�|jj
j|�|j|jj�|j|jj�yr
)
rr!r�r�_accept_futures�
_stop_servingrZrrCr�r"r9rA)r,�sock1�future1�sock2�future2s     r�test_stop_servingz,BaseProactorEventLoopTests.test_stop_servingds����	�	����)�)�+���	�	����)�)�+���L�L�N�G��L�L�N�G�%
��	�	�!�
	
�	�	����&�������*�*�+�������-�-�.��
�
�#�#�6�6�u�=�������+�+�,�������.�.�/rc��tjtj�|_|j
j
|j|j�Sr
)r$r%rrr'r�_make_datagram_transportr)rns rrz-BaseProactorEventLoopTests.datagram_transportus9��"�5�5�g�6N�6N�O��
��y�y�1�1�$�)�)�T�]�]�K�Krc��|j�}|j|t�|j|tj�t|�yr
)rrMrr�DatagramTransportrrEs  r�test_make_datagram_transportz7BaseProactorEventLoopTests.test_make_datagram_transportys?��
�
$�
$�
&�����b�"<�=����b�'�";�";�<���rc��|j�}|jjd�|j�|jj
jj|jdd��|jj
jjjj|j�t|�y)N�rH��	127.0.0.1i$/rHr�r)rrx�
appendleftrurr#r!r9r)r�r�rrEs  r�test_datagram_loop_writingz5BaseProactorEventLoopTests.test_datagram_loop_writings���
�
$�
$�
&��
�
�
���=�>�
�����	�	���"�"�5�5�d�i�i��Oc�5�d��	�	���"�"�/�/�A�A���r�/�/�0���rc��|j�}|j�|jjjj|jd�|j|jjj�|j|jjj�t|�y)N�)
rr@rr#�recvfromr9r)rAr'�datagram_receivedrCrErrEs  r�test_datagram_loop_readingz5BaseProactorEventLoopTests.test_datagram_loop_reading�s���
�
$�
$�
&��
�����	�	���$�$�7�7��	�	�:�N�������8�8�?�?�@�������5�5�<�<�=���rc��|jj�}|jd�|j�}||_|j|�|jjjj|jd�|jjjdd�t|�y)Nr�r�rHr�)
rr3rIrrKr@r#r�r9r)r'r�rr[s   r�test_datagram_loop_reading_dataz:BaseProactorEventLoopTests.test_datagram_loop_reading_data�s����i�i�%�%�'�����6�7�
�
$�
$�
&�����
������	�	���$�$�7�7��	�	�:�N��
�
�'�'�:�:�7�DX�Y���rrUc�N�|jj�}|jd�|j�}|j	t
|j|�tj�|_	||_
|j
|�|j|jjjj�|j|j j"j�|j|jj�t%|�y)N)rr�)rr3rIrrXrYr@rr!rrKrZr#r�rCrAr'rErr[s   r�"test_datagram_loop_reading_no_dataz=BaseProactorEventLoopTests.test_datagram_loop_reading_no_data�s����i�i�%�%�'�����2�3�
�
$�
$�
&�����.�"�*:�*:�C�@��9�9�;������
���������	�	�+�+�4�4�;�;�<�������5�5�<�<�=���������)���rc�z�t�x}|jjj_|j�}t
j�|_t
j�|j_
|j�|jjj|�t|�yr
)r_rr#r�r`rrr!ra�	_protocolrEr@r9rrbs   r�"test_datagram_loop_reading_abortedz=BaseProactorEventLoopTests.test_datagram_loop_reading_aborted�s{��9O�9Q�Q��d�i�i�!�!�*�*�6�
�
$�
$�
&���)�)�+���&*�i�i�k����#�
����
���#�#�6�6�s�;���rc��t�x}|jjj_|j�}t
j�|_t
j�|j_
|jjd�|j�|jjj|�t|�y)N)sHellor�)r_rr#r!r`rrr!rar�rErxr�rur9rrbs   r�"test_datagram_loop_writing_abortedz=BaseProactorEventLoopTests.test_datagram_loop_writing_aborted�s���7M�7O�O��d�i�i�!�!�(�(�4�
�
$�
$�
&���)�)�+���&*�i�i�k����#�
�
�
���>�?�
����
���#�#�6�6�s�;���r) rrr	rrrr>ror�rsrxr{r}r�r�r�r�r�rr�r�r�r�r
rrr
rr�r�r�rrs@rr]r]�s����'��T�Z�Z�;�<��=��	!�	<��
*�*�A�2�&��T�Z�Z�,�-�,�.�,�60�0�"L����	��X�_�_�S�Y�Y�'�'�)T�U�
�V�
��	rr]�win32z%Proactor is supported on Windows onlyc���eZdZddzZGd�dej
�Ze�fd��Ze�fd��Z	�fd�Z
dd�Zd	�Zd
�Z
d�Zd�Zd
�Zd�Z�xZS)�&ProactorEventLoopUnixSockSendfileTestss�12345abcde12345abcde12345abcde12345abcde12345abcde12345abcde12345abcde12345abcde12345abcde12345abcde12345abcde12345abcde12345abcde12345abcde12345abcde12345abcde�c�*�eZdZd�Zd�Zd�Zd�Zd�Zy)�.ProactorEventLoopUnixSockSendfileTests.MyProtoc�v�d|_d|_t�|_|j	�|_d|_yrj)�started�closedr:rtr3r<r)r,rs  r�__init__z7ProactorEventLoopUnixSockSendfileTests.MyProto.__init__�s0�� �D�L��D�K�!��D�I��)�)�+�D�H�!�D�Nrc� �d|_||_yrf)r�rr,s  rr7z>ProactorEventLoopUnixSockSendfileTests.MyProto.connection_made�s���D�L�&�D�Nrc�:�|jj|�yr
)rt�extend)r,rts  rrBz<ProactorEventLoopUnixSockSendfileTests.MyProto.data_received�s���I�I���T�"rc�H�d|_|jjd�yrf)r�r<rI)r,�excs  rr�z>ProactorEventLoopUnixSockSendfileTests.MyProto.connection_lost�s���D�K��H�H����%rc��8K�|j�d{���y7��wr
)r<rns r�wait_closedz:ProactorEventLoopUnixSockSendfileTests.MyProto.wait_closed�s�����(�(�N�N�s���N)rrr	r�r7rBr�r�rrr�MyProtor��s��	"�	'�	#�	&�	rr�c���ttjd�5}|j|j�ddd�t
�|��y#1swY�xYw)N�wb)�openr	�TESTFNrv�DATAr�
setUpClass)�cls�fpr-s  �rr�z1ProactorEventLoopUnixSockSendfileTests.setUpClass�s>���
�)�"�"�D�
)�R��H�H�S�X�X��*�
����*�
)�s�A�Ac�h��tjtj�t�|��yr
)r	�unlinkr�r�
tearDownClass)r�r-s �rr�z4ProactorEventLoopUnixSockSendfileTests.tearDownClass�s"�������)�)�*�
���rc�\��tj�|_|j|j�|j	|jj
�t
tjd�|_	|j	|jj
�t�|�-�y)N�rb)r�ProactorEventLooprrdr rr�r	r��filerrr+s �rrz,ProactorEventLoopUnixSockSendfileTests.setUp�sj����-�-�/��	����D�I�I�&�����	�	���(���)�)�4�0��	�����	�	���(�
��
�rc��tjtjtj�}|j|�|j	tj
tjd�|j	tj
tjd�|r|j|j�|S)Nr�)
r(�AF_INET�SOCK_STREAM�setblocking�
setsockopt�
SOL_SOCKET�	SO_SNDBUF�	SO_RCVBUFr r)r,�cleanup�blockingr)s    r�make_socketz2ProactorEventLoopUnixSockSendfileTests.make_socket�sz���}�}�V�^�^�V�-?�-?�@������"�����)�)�6�+;�+;�T�B�����)�)�6�+;�+;�T�B���O�O�D�J�J�'��rc�8�|jj|�Sr
)r�run_until_complete)r,�coros  r�run_loopz/ProactorEventLoopUnixSockSendfileTests.run_loop�s���y�y�+�+�D�1�1rc�������j�}�j�j��tj�}�jd��}|jd|f��j
�jj�fd�|�����j
�jj||j������fd�}�j|�|�fS)NF)r�r�c����Sr
r)�protos�rr�z@ProactorEventLoopUnixSockSendfileTests.prepare.<locals>.<lambda>s���Er)r)c�����j�9�jj��j�j���j��j�j��yr
)rrr�r�)r�r,�servers���rr�z?ProactorEventLoopUnixSockSendfileTests.prepare.<locals>.cleanupsR������*����%�%�'��
�
�e�/�/�1�2��L�L�N��M�M�&�,�,�.�/r)r�r�rr
�find_unused_port�bindr��
create_server�sock_connect�getsocknamer )r,r)�port�srv_sockr�r�r�s`    @@r�preparez.ProactorEventLoopUnixSockSendfileTests.prepare�s�������!�����T�Y�Y�'���-�-�/���#�#�E�#�2���
�
�{�D�)�*����t�y�y�6�6��� 7� *�+���
�
�d�i�i�,�,�T�8�3G�3G�3I�J�K�	0�	
���� ��U�{�rc	�V�|j�\}}t�}|jtjd�5|j|jj||dd��ddd�|j|jj�d�y#1swY�4xYw�N�not a regular filer)r�r1�assertRaisesRegexr�SendfileNotAvailableErrorr�r�_sock_sendfile_nativerwr��tell�r,r)r�r�s    r�test_sock_sendfile_not_a_filezDProactorEventLoopUnixSockSendfileTests.test_sock_sendfile_not_a_files����l�l�n���e��H��
�
#�
#�G�$E�$E�$8�:��M�M�$�)�)�9�9�$��:;�T�C�
D�:�	
��������)�1�-�	:�:�s�.B�B(c	�j�|j�\}}tj�}|jtj
d�5|j
|jj||dd��ddd�|j|jj�d�y#1swY�4xYwr�)r��io�BytesIOr�rr�r�rr�rwr�r�r�s    r�test_sock_sendfile_iobufferzBProactorEventLoopUnixSockSendfileTests.test_sock_sendfile_iobuffers����l�l�n���e��J�J�L��
�
#�
#�G�$E�$E�$8�:��M�M�$�)�)�9�9�$��:;�T�C�
D�:�	
��������)�1�-�	:�:�s�.B)�)B2c	��|j�\}}tj�}d|j_|jtjd�5|j|jj||dd��ddd�|j|jj�d�y#1swY�4xYw)Nr�r�r)r�rr!r�r�r�rr�r�rr�rwr�r�r�s    r�#test_sock_sendfile_not_regular_filezJProactorEventLoopUnixSockSendfileTests.test_sock_sendfile_not_regular_file's����l�l�n���e��I�I�K�� "�����
�
#�
#�G�$E�$E�$8�:��M�M�$�)�)�9�9�$��:;�T�C�
D�:�	
��������)�1�-�	:�:�s�.B:�:Cc��|jjd�|jd��}|jtd�5|j|jj
||j��ddd�y#1swYyxYw)NT)r�zmust be non-blocking)r�	set_debugr�r�rLr��
sock_sendfiler�)r,r)s  r�test_blocking_socketz;ProactorEventLoopUnixSockSendfileTests.test_blocking_socket1sf���	�	���D�!������.��
�
#�
#�J�0F�
G��M�M�$�)�)�1�1�$��	�	�B�C�H�
G�
G�s�6B�B)TF)rrr	r�rr&r��classmethodr�r�rr�r�r�r�r�r�r�rrs@rr�r��sr�����$�D��'�"�"��.����
� �� ���2��0.�.�.�Drr��__main__)�__doc__r�r(r
rrr�asyncio.proactor_eventsrrrrr�test.supportr	r
�test.test_asynciorr$rr�TestCaserrr]r�platformr�r�mainrrr�<module>rs���"�	�
��
���9�<�?�@�>�"�&�1�(��{=�:�#6�#6�{=�|G"�Z�%8�%8�G"�TV��!4�!4�V�r��������(�8�:�qD�Z�-@�-@�qD�:�qD�f�z���H�M�M�O�r

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists