a
    	¼3jü  ã                   @   s2   d dl Z d dl mZ d dlZG dd„ de jƒZdS )é    N)Úmockc                   @   s4   e Zd Zdd„ Zdd„ Zdd„ Zdd„ Zd	d
„ ZdS )ÚProtocolsAbsTestsc                 C   s`   t  ¡ }t ¡ }|  | |¡¡ |  | |¡¡ |  | ¡ ¡ |  | ¡ ¡ |  	t
|dƒ¡ d S ©NÚ__dict__)r   ÚMockÚasyncioZBaseProtocolÚassertIsNoneÚconnection_madeÚconnection_lostÚpause_writingÚresume_writingÚassertFalseÚhasattr©ÚselfÚfÚp© r   ú\/www/server/python_manager/versions/3.9.10/lib/python3.9/test/test_asyncio/test_protocols.pyÚtest_base_protocol	   s    z$ProtocolsAbsTests.test_base_protocolc                 C   s~   t  ¡ }t ¡ }|  | |¡¡ |  | |¡¡ |  | |¡¡ |  | ¡ ¡ |  | 	¡ ¡ |  | 
¡ ¡ |  t|dƒ¡ d S r   )r   r   r   ÚProtocolr   r	   r
   Zdata_receivedZeof_receivedr   r   r   r   r   r   r   r   Útest_protocol   s    zProtocolsAbsTests.test_protocolc                 C   s€   t  ¡ }t ¡ }|  | |¡¡ |  | |¡¡ |  | d¡¡ |  | d¡¡ |  | 	¡ ¡ |  | 
¡ ¡ |  t|dƒ¡ d S )Néd   é–   r   )r   r   r   ZBufferedProtocolr   r	   r
   Z
get_bufferZbuffer_updatedr   r   r   r   r   r   r   r   Útest_buffered_protocol   s    z(ProtocolsAbsTests.test_buffered_protocolc                 C   sf   t  ¡ }t ¡ }|  | |¡¡ |  | |¡¡ |  | |¡¡ |  | ||¡¡ |  	t
|dƒ¡ d S r   )r   r   r   ZDatagramProtocolr   r	   r
   Zerror_receivedZdatagram_receivedr   r   )r   r   Zdpr   r   r   Útest_datagram_protocol(   s    z(ProtocolsAbsTests.test_datagram_protocolc                 C   sv   t  ¡ }t ¡ }|  | |¡¡ |  | |¡¡ |  | d|¡¡ |  | d|¡¡ |  | 	¡ ¡ |  
t|dƒ¡ d S )Né   r   )r   r   r   ZSubprocessProtocolr   r	   r
   Zpipe_data_receivedZpipe_connection_lostZprocess_exitedr   r   )r   r   Úspr   r   r   Útest_subprocess_protocol1   s    z*ProtocolsAbsTests.test_subprocess_protocolN)Ú__name__Ú
__module__Ú__qualname__r   r   r   r   r   r   r   r   r   r      s
   		r   )Zunittestr   r   ZTestCaser   r   r   r   r   Ú<module>   s   