File: D:/Python311/Lib/test/test_asyncio/__pycache__/test_protocols.cpython-311.opt-2.pyc
�
��Vc5 � �| � d dl Z d dl mZ d dlZd� Z G d� de j � � Zedk r e j � � dS dS )� N)�mockc �. � t j d � � d S )N)�asyncio�set_event_loop_policy� � �4D:\Python311\Lib\test\test_asyncio\test_protocols.py�tearDownModuler
s � � �!�$�'�'�'�'�'r c �, � e Zd Zd� Zd� Zd� Zd� Zd� ZdS )�ProtocolsAbsTestsc �� � t j � � }t j � � }| � |� |� � � � | � |� |� � � � | � |� � � � � | � |� � � � � | � t |d� � � � d S �N�__dict__)r �Mockr �BaseProtocol�assertIsNone�connection_made�connection_lost�
pause_writing�resume_writing�assertFalse�hasattr��self�f�ps r �test_base_protocolz$ProtocolsAbsTests.test_base_protocol s� � ��I�K�K��� �"�"�����!�+�+�A�.�.�/�/�/����!�+�+�A�.�.�/�/�/����!�/�/�+�+�,�,�,����!�*�*�,�,�-�-�-������J�/�/�0�0�0�0�0r c �r � t j � � }t j � � }| � |� |� � � � | � |� |� � � � | � |� |� � � � | � |� � � � � | � |� � � � � | � |�
� � � � | � t |d� � � � d S r )
r r r �Protocolr r r �
data_received�eof_receivedr r r r r s r �
test_protocolzProtocolsAbsTests.test_protocol s� � ��I�K�K����������!�+�+�A�.�.�/�/�/����!�+�+�A�.�.�/�/�/����!�/�/�!�,�,�-�-�-����!�.�.�*�*�+�+�+����!�/�/�+�+�,�,�,����!�*�*�,�,�-�-�-������J�/�/�0�0�0�0�0r c �t � t j � � }t j � � }| � |� |� � � � | � |� |� � � � | � |� d� � � � | � |� d� � � � | � |� � � � � | � |�
� � � � | � t |d� � � � d S )N�d � r )
r r r �BufferedProtocolr r r �
get_buffer�buffer_updatedr r r r r s r �test_buffered_protocolz(ProtocolsAbsTests.test_buffered_protocol# s � ��I�K�K���$�&�&�����!�+�+�A�.�.�/�/�/����!�+�+�A�.�.�/�/�/����!�,�,�s�+�+�,�,�,����!�*�*�3�/�/�0�0�0����!�/�/�+�+�,�,�,����!�*�*�,�,�-�-�-������J�/�/�0�0�0�0�0r c �� � t j � � }t j � � }| � |� |� � � � | � |� |� � � � | � |� |� � � � | � |� ||� � � � | � t |d� � � � d S r )r r r �DatagramProtocolr r r �error_received�datagram_receivedr r )r r �dps r �test_datagram_protocolz(ProtocolsAbsTests.test_datagram_protocol. s� � ��I�K�K��
�
%�
'�
'�����"�,�,�Q�/�/�0�0�0����"�,�,�Q�/�/�0�0�0����"�+�+�A�.�.�/�/�/����"�.�.�q�!�4�4�5�5�5������Z�0�0�1�1�1�1�1r c �* � t j � � }t j � � }| � |� |� � � � | � |� |� � � � | � |� d|� � � � | � |� d|� � � � | � |� � � � � | �
t |d� � � � d S )N� r )r r r �SubprocessProtocolr r r �pipe_data_received�pipe_connection_lost�process_exitedr r )r r �sps r �test_subprocess_protocolz*ProtocolsAbsTests.test_subprocess_protocol7 s� � ��I�K�K��
�
'�
)�
)�����"�,�,�Q�/�/�0�0�0����"�,�,�Q�/�/�0�0�0����"�/�/��1�5�5�6�6�6����"�1�1�!�Q�7�7�8�8�8����"�+�+�-�-�.�.�.������Z�0�0�1�1�1�1�1r N)�__name__�
__module__�__qualname__r r"