| Server IP : 138.197.176.125 / Your IP : 216.73.217.54 Web Server : Apache/2.4.41 (Ubuntu) System : Linux SuiteCRM-8 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 User : root ( 0) PHP Version : 8.3.19 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /lib/python3/dist-packages/twisted/internet/test/__pycache__/ |
Upload File : |
U
W[1 � @ sp d Z ddlmZmZ ddlmZ ddlmZ ddlm Z e�
� sLddlmZ G dd� de�Z
e� �e
�� � d S )
z&
Tests for L{twisted.internet.stdio}.
� )�absolute_import�division)�platform)�ReactorBuilder)�Protocol)�
StandardIOc @ s\ e Zd ZdZdd� Zdd� Zdd� Zdd � Zd
d� Zdd
� Z dd� Z
dd� Ze�
� rXdZdS )�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 5 Q R X t|d��0}|� }t||�� | j�� � d� | �� � W 5 Q R X | � |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 )N� hello!)�data�stop)r r ��reactorr r �dataReceived( s
zAStdioFilesTests.test_addReader.<locals>.DataProtocol.dataReceivedN)�__name__�
__module__�__qualname__r r r r r r �DataProtocol&