HEX
Server: Microsoft-IIS/10.0
System: Windows NT ITPWINWEBSVR22 10.0 build 20348 (Windows Server 2022) AMD64
User: www.conferencesearch.co.uk (0)
PHP: 8.3.30
Disabled: NONE
Upload Files
File: D:/Python311/Lib/test/test_asyncio/__pycache__/test_buffered_proto.cpython-311.pyc
�

��Vcz	��4�ddlZddlZddlmZd�ZGd�dej��ZGd�dej��Z	Gd�d	e	ej
��Zeje
ed
��d��Gd�d
e	ej
����Zedkrej��dSdS)�N)�
functionalc�.�tjd��dS�N)�asyncio�set_event_loop_policy���9D:\Python311\Lib\test\test_asyncio\test_buffered_proto.py�tearDownModulers���!�$�'�'�'�'�'r	c�&�eZdZd�Zd�Zd�Zd�ZdS)�ReceiveStuffProtoc�"�||_||_dSr)�cb�con_lost_fut)�selfrrs   r
�__init__zReceiveStuffProto.__init__s�����(����r	c�8�td��|_|jS)N�d)�	bytearray�buffer)r�sizehints  r
�
get_bufferzReceiveStuffProto.get_buffers����n�n����{�r	c�J�|�|jd|���dSr)rr)r�nbytess  r
�buffer_updatedz ReceiveStuffProto.buffer_updateds%�������G�V�G�$�%�%�%�%�%r	c�v�|�|j�d��dS|j�|��dSr)r�
set_result�
set_exception)r�excs  r
�connection_lostz!ReceiveStuffProto.connection_lostsD���	1���(�(��.�.�.�.�.���+�+�C�0�0�0�0�0r	N)�__name__�
__module__�__qualname__rrrr rr	r
r
r
sP������)�)�)����&�&�&�1�1�1�1�1r	r
c��eZdZd�Zd�ZdS)�BaseTestBufferedProtocolc��t�r)�NotImplementedError�rs r
�new_loopz!BaseTestBufferedProtocol.new_loop s��!�!r	c����ddz���fd�}�fd�}�j�tj|dd����}|jd���}�j�tj||��d����|����j�|�����dS)Ns	12345678+ic�������K�d����fd���j�����jj��fd�g|�R��d{V��\�}��d{V��dS)Nr	c�L���|z
���kr��d��dSdS)N�1)�write)�buf�NOISE�data�trs ���r
�on_bufz^BaseTestBufferedProtocol.test_buffered_proto_create_connection.<locals>.client.<locals>.on_buf*s5��������5�=�#��H�H�T�N�N�N�N�N�#�#r	c�$��t����Sr)r
)�
conn_lost_futr3s��r
�<lambda>z`BaseTestBufferedProtocol.test_buffered_proto_create_connection.<locals>.client.<locals>.<lambda>3s���)�&�-�@�@�r	)�loop�
create_future�create_connection)�addr�prr5r1r3r2r0rs  @@@@��r
�clientzNBaseTestBufferedProtocol.test_buffered_proto_create_connection.<locals>.client's�����������D�
#�
#�
#�
#�
#�
#�
#�!�I�3�3�5�5�M�6�4�9�6�@�@�@�@�@�I�CG�I�I�I�I�I�I�I�I�I�F�B�� ���������r	c����K�|����|�d���d{V��|���|����d{V��dS)N�)r.�readexactly�close�wait_closed)�reader�writerr0s  �r
�on_server_clientzXBaseTestBufferedProtocol.test_buffered_proto_create_connection.<locals>.on_server_client7sv������L�L������$�$�Q�'�'�'�'�'�'�'�'�'��L�L�N�N�N��$�$�&�&�&�&�&�&�&�&�&�&�&r	z	127.0.0.1r�)	r7�run_until_completer�start_server�sockets�getsockname�wait_forr@rA)rr<rD�srvr:r0s`    @r
�%test_buffered_proto_create_connectionz>BaseTestBufferedProtocol.test_buffered_proto_create_connection#s������t�#��	 �	 �	 �	 �	 �	 � 	'�	'�	'�	'�	'��i�*�*�� � �+�q�
2�
2�3�3���{�1�~�)�)�+�+���	�$�$���V�V�D�\�\�1�-�-�	/�	/�	/�	�	�	�����	�$�$�S�_�_�%6�%6�7�7�7�7�7r	N)r!r"r#r)rLrr	r
r%r%s2������"�"�"�#8�#8�#8�#8�#8r	r%c��eZdZd�ZdS)�BufferedProtocolSelectorTestsc�(�tj��Sr)r�SelectorEventLoopr(s r
r)z&BufferedProtocolSelectorTests.new_loopL����(�*�*�*r	N�r!r"r#r)rr	r
rNrNIs#������+�+�+�+�+r	rN�ProactorEventLoopzWindows onlyc��eZdZd�ZdS)�BufferedProtocolProactorTestsc�(�tj��Sr)rrSr(s r
r)z&BufferedProtocolProactorTests.new_loopTrQr	NrRrr	r
rUrUPs#������+�+�+�+�+r	rU�__main__)r�unittest�test.test_asyncior�
func_testsr�BufferedProtocolr
�FunctionalTestCaseMixinr%�TestCaserN�
skipUnless�hasattrrUr!�mainrr	r
�<module>rasI����������6�6�6�6�6�6�(�(�(�1�1�1�1�1��0�1�1�1�&(8�(8�(8�(8�(8�z�A�(8�(8�(8�V+�+�+�+�+�$<�$,�$5�+�+�+����W�W�W�&9�:�:�N�K�K�+�+�+�+�+�$<�$,�$5�+�+�L�K�+��z����H�M�O�O�O�O�O��r