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_buffered_proto.cpython-312.pyc

�

(Μg!	��:�ddlZddlZddlmZd�ZGd�dej�ZGd�dej�Z	Gd�d	e	ej�Zeje
ed
�d�Gd�d
e	ej��Zedk(rej �yy)�N)�
functionalc�.�tjd�y�N)�asyncio�set_event_loop_policy���B/usr/local/lib/python3.12/test/test_asyncio/test_buffered_proto.py�tearDownModulers���!�!�$�'r	c�$�eZdZd�Zd�Zd�Zd�Zy)�ReceiveStuffProtoc� �||_||_yr)�cb�con_lost_fut)�selfrrs   r
�__init__zReceiveStuffProto.__init__s�����(��r	c�:�td�|_|jS)N�d)�	bytearray�buffer)r�sizehints  r
�
get_bufferzReceiveStuffProto.get_buffers����n����{�{�r	c�@�|j|jd|�yr)rr)r�nbytess  r
�buffer_updatedz ReceiveStuffProto.buffer_updateds��������G�V�$�%r	c�v�|�|jjd�y|jj|�yr)r�
set_result�
set_exception)r�excs  r
�connection_lostz!ReceiveStuffProto.connection_losts/���;����(�(��.����+�+�C�0r	N)�__name__�
__module__�__qualname__rrrr rr	r
r
r
s��)��&�1r	r
c��eZdZd�Zd�Zy)�BaseTestBufferedProtocolc��t�r)�NotImplementedError�rs r
�new_loopz!BaseTestBufferedProtocol.new_loop s��!�!r	c����ddz���fd�}�fd�}�jjtj|dd��}|jdj�}�jjtj||�d��|j��jj|j��y)Ns	12345678+ic��������K�d����fd���jj���jj��fd�g|����d{���\�}��d{���y7�7��w)Nr	c�>���|z
���k(r�jd�yy)N�1)�write)�buf�NOISE�data�trs ���r
�on_bufz^BaseTestBufferedProtocol.test_buffered_proto_create_connection.<locals>.client.<locals>.on_buf*s#��������5�=��H�H�T�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'si������D�
#�!�I�I�3�3�5�M�6�4�9�9�6�6�@�I�CG�I�I�F�B�� ���I��
 �s$�AA&�A"�A&�A$�A&�$A&c���K�|j��|jd��d{���|j�|j��d{���y7�-7��w)N�)r.�readexactly�close�wait_closed)�reader�writerr0s  �r
�on_server_clientzXBaseTestBufferedProtocol.test_buffered_proto_create_connection.<locals>.on_server_client7sK������L�L����$�$�Q�'�'�'��L�L�N��$�$�&�&�&�
(��&�s!�&A�A�'A�A�A�Az	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�i�*�*�� � � �+�q�
2�3���{�{�1�~�)�)�+���	�	�$�$����V�D�\�1�-�	/�	�	�	���	�	�$�$�S�_�_�%6�7r	N)r!r"r#r)rLrr	r
r%r%s��"�#8r	r%c��eZdZd�Zy)�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�Zy)�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>ras�����6�(�1��0�0�1�&(8�z�A�A�(8�V+�$<�$,�$5�$5�+�����W�W�&9�:�N�K�+�$<�$,�$5�$5�+�L�+��z���H�M�M�O�r	

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