HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //usr/local/lib/python3.10/test/test_asyncio/__pycache__/test_transports.cpython-310.opt-2.pyc
o

�i��@s\	ddlZddlmZddlZddlmZdd�ZGdd�dej�Zedkr,e��dSdS)	�N)�mock)�
transportscCst�d�dS�N)�asyncioZset_event_loop_policy�rr�>/usr/local/lib/python3.10/test/test_asyncio/test_transports.py�tearDownModule
src@sDeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dS)�TransportTestscCst��}|�|ji�dSr)r�	Transport�assertEqualZ_extra��self�	transportrrr�test_ctor_extra_is_nonesz&TransportTests.test_ctor_extra_is_nonecCsNt�ddi�}|�d|�d��|�|�d��t�}|�||�d|��dS)N�extra�info�unknown)rr
rZget_extra_infoZassertIsNone�objectZassertIs)r
r�defaultrrr�test_get_extra_infos
z"TransportTests.test_get_extra_infocsXt���G�fdd�dtj�}|�}|�dtd�td�g�|�d�j���	d�dS)NcseZdZ�fdd�ZdS)z3TransportTests.test_writelines.<locals>.MyTransportcs�|�dSrr)r
�data��writerrr�write"sz9TransportTests.test_writelines.<locals>.MyTransport.writeN)�__name__�
__module__�__qualname__rrrrr�MyTransport!srsline1sline2sline3�sline1line2line3)
r�Mockrr
�
writelines�	bytearray�
memoryviewrZ
call_countZassert_called_with)r
rrrrr�test_writeliness�zTransportTests.test_writelinescCs�t��}|�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_sizerZ	write_eofZ
can_write_eofZ
pause_readingZresume_readingZ
is_reading�close�abortrrrr�test_not_implemented-s�z#TransportTests.test_not_implementedcCs*t��}|�t|jd�|�t|j�dSr$)rZDatagramTransportr%r&�sendtor*rrrr�test_dgram_not_implemented<sz)TransportTests.test_dgram_not_implementedcCsdt��}|�t|j�|�t|j�|�t|jd�|�t|jd�|�t|j�|�t|j	�dS)Nr)
rZSubprocessTransportr%r&Zget_pidZget_returncodeZget_pipe_transport�send_signal�	terminate�killrrrr�)test_subprocess_transport_not_implementedBsz8TransportTests.test_subprocess_transport_not_implementedcCs�Gdd�dtjtj�}t��}||d�}t��|_|�|j�|�t	d��|j
ddd�Wd�n1s7wY|j
dd	d�|�|j�|�|��d
�|j
dd	d�|�
|j�|�|��d�dS)
Nc@seZdZdd�ZdS)zKTransportTests.test_flowcontrol_mixin_set_write_limits.<locals>.MyTransportcSsdS)Nir)r
rrrr(QszaTransportTests.test_flowcontrol_mixin_set_write_limits.<locals>.MyTransport.get_write_buffer_sizeN)rrrr(rrrrrNsr)�loopzhigh.*must be >= lowrr)�high�low��)r6r5�)r6r7)rZ_FlowControlMixinr
rrZ	_protocolZassertFalseZ_protocol_pausedZassertRaisesRegex�
ValueErrorr'rZget_write_buffer_limitsZ
assertTrue)r
rr2rrrr�'test_flowcontrol_mixin_set_write_limitsLs �

�z6TransportTests.test_flowcontrol_mixin_set_write_limitsN)
rrrrrr#r+r-r1r9rrrrr	s
r	�__main__)	ZunittestrrrrZTestCaser	r�mainrrrr�<module>sV�