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_transports.cpython-311.opt-1.pyc
�

��VcO���dZddlZddlmZddlZddlmZd�ZGd�dej��Zedkrej	��dSdS)	zTests for transports.py.�N)�mock)�
transportsc�.�tjd��dS�N)�asyncio�set_event_loop_policy���5D:\Python311\Lib\test\test_asyncio\test_transports.py�tearDownModuler
s���!�$�'�'�'�'�'r
c�8�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	dS)	�TransportTestsc�b�tj��}|�|ji��dSr)r�	Transport�assertEqual�_extra��self�	transports  r�test_ctor_extra_is_nonez&TransportTests.test_ctor_extra_is_nones/���%�'�'�	�����)�2�.�.�.�.�.r
c�D�tjddi��}|�d|�d����|�|�d����t��}|�||�d|����dS)N�extra�info�unknown)rrr�get_extra_info�assertIsNone�object�assertIs)rr�defaults   r�test_get_extra_infoz"TransportTests.test_get_extra_infos����%�w��&7�8�8�	������!9�!9�'�!B�!B�C�C�C����)�2�2�9�=�=�>�>�>��(�(���
�
�g�y�7�7�	�7�K�K�L�L�L�L�Lr
c�:��tj���G�fd�dtj��}|��}|�dtd��t
d��g��|�d�j����	d��dS)Nc���eZdZ�fd�ZdS)�3TransportTests.test_writelines.<locals>.MyTransportc����|��dSrr	)r�data�writers  �r�writez9TransportTests.test_writelines.<locals>.MyTransport.write"s�����t�����r
N)�__name__�
__module__�__qualname__r')r&s�r�MyTransportr#!s.�������
�
�
�
�
�
�
r
r+sline1sline2sline3�sline1line2line3)
r�Mockrr�
writelines�	bytearray�
memoryviewr�
call_count�assert_called_with)rr+rr&s   @r�test_writelineszTransportTests.test_writeliness���������	�	�	�	�	�	�	�'�+�	�	�	� �K�M�M�	����h�'��1�1�(��2�2�4�	5�	5�	5�	
����F�-�.�.�.��!�!�"4�5�5�5�5�5r
c��tj��}|�t|j��|�t|j��|�t|jd��|�t|j��|�t|j��|�t|j	��|�t|j
��|�t|j��|�t|j��|�t|j
��dS�Nr%)rr�assertRaises�NotImplementedError�set_write_buffer_limits�get_write_buffer_sizer'�	write_eof�
can_write_eof�
pause_reading�resume_reading�
is_reading�close�abortrs  r�test_not_implementedz#TransportTests.test_not_implemented-s ���%�'�'�	����-�#�;�	=�	=�	=����-�y�/N�O�O�O����-�y���G�G�G����-�y�/B�C�C�C����-�y�/F�G�G�G����-�y�/F�G�G�G����-�y�/G�H�H�H����-�y�/C�D�D�D����-�y��?�?�?����-�y��?�?�?�?�?r
c��tj��}|�t|jd��|�t|j��dSr5)r�DatagramTransportr6r7�sendtor@rs  r�test_dgram_not_implementedz)TransportTests.test_dgram_not_implemented<sK���-�/�/�	����-�y�/?��H�H�H����-�y��?�?�?�?�?r
c��tj��}|�t|j��|�t|j��|�t|jd��|�t|jd��|�t|j��|�t|j	��dS)Nr,)
r�SubprocessTransportr6r7�get_pid�get_returncode�get_pipe_transport�send_signal�	terminate�killrs  r�)test_subprocess_transport_not_implementedz8TransportTests.test_subprocess_transport_not_implementedBs����/�1�1�	����-�y�/@�A�A�A����-�y�/G�H�H�H����-�y�/K�Q�O�O�O����-�y�/D�a�H�H�H����-�y�/B�C�C�C����-�y�~�>�>�>�>�>r
c���Gd�dtjtj��}tj��}||���}tj��|_|�|j��|�td��5|�
dd���ddd��n#1swxYwY|�
dd	���|�|j��|�|���d
��|�
dd	���|�
|j��|�|���d��dS)
Nc��eZdZd�ZdS)�KTransportTests.test_flowcontrol_mixin_set_write_limits.<locals>.MyTransportc��dS)Nir	)rs rr9zaTransportTests.test_flowcontrol_mixin_set_write_limits.<locals>.MyTransport.get_write_buffer_sizeQs���sr
N)r(r)r*r9r	r
rr+rQNs#������
�
�
�
�
r
r+)�loopzhigh.*must be >= lowrr,)�high�low��)rWrV�)rWrX)r�_FlowControlMixinrrr-�	_protocol�assertFalse�_protocol_paused�assertRaisesRegex�
ValueErrorr8r�get_write_buffer_limits�
assertTrue)rr+rSrs    r�'test_flowcontrol_mixin_set_write_limitsz6TransportTests.test_flowcontrol_mixin_set_write_limitsLs���	�	�	�	�	�*�6�$�.�	�	�	��y�{�{���K�T�*�*�*�	�"�i�k�k�	������3�4�4�4�
�
#�
#�J�0F�
G�
G�	=�	=��-�-�1�!�-�<�<�<�	=�	=�	=�	=�	=�	=�	=�	=�	=�	=�	=����	=�	=�	=�	=�	�)�)�t��)�=�=�=�����3�4�4�4�����:�:�<�<�k�J�J�J��)�)�s��)�<�<�<����	�2�3�3�3�����:�:�<�<�j�I�I�I�I�Is�B4�4B8�;B8N)
r(r)r*rr r3rArErNrar	r
rrrs�������/�/�/�M�M�M�
6�
6�
6�
@�
@�
@�@�@�@�?�?�?�J�J�J�J�Jr
r�__main__)
�__doc__�unittestrrrr�TestCaserr(�mainr	r
r�<module>rgs�������������������������(�(�(�SJ�SJ�SJ�SJ�SJ�X�&�SJ�SJ�SJ�l�z����H�M�O�O�O�O�O��r