File: //usr/lib/python3/dist-packages/twisted/internet/test/__pycache__/test_stdio.cpython-310.pyc
o
�b� � @ s` d Z ddlmZ ddlmZ ddlmZ e�� sddlm Z G dd� de�Z
e� �e
�
� � dS ) z&
Tests for L{twisted.internet.stdio}.
� )�Protocol)�ReactorBuilder)�platform)�
StandardIOc @ s` e Zd ZdZdd� Zdd� Zdd� Zdd � Zd
d� Zdd
� Z dd� Z
dd� Ze�
� r.dZdS dS )�StdioFilesTestszI
L{StandardIO} supports reading and writing to filesystem files.
c C s4 | � � }t|d��� t|d�| _| �| jj� d S )N�wbzrb+)�mktemp�open�close� extraFile�
addCleanup)�self�path� r �B/usr/lib/python3/dist-packages/twisted/internet/test/test_stdio.py�setUp s zStdioFilesTests.setUpc s� | � � � G � fdd�dt�}| �� }t|d��
}|�d� W d � n1 s'w Y t|d��}|� }t||�� | j�� � d� | �� � W d � n1 sQw Y | � |j
d� dS )zc
Adding a filesystem file reader to a reactor will make sure it is
polled.
c s e Zd ZdZ� fdd�ZdS )z4StdioFilesTests.test_addReader.<locals>.DataProtocol� c s( | j |7 _ | j dkr� �� d S d S )N� hello!)�data�stop)r
r ��reactorr r �dataReceived&