%PDF- %PDF-
Direktori : /usr/lib/python3/dist-packages/twisted/internet/test/__pycache__/ |
Current File : //usr/lib/python3/dist-packages/twisted/internet/test/__pycache__/test_stdio.cpython-312.pyc |
� Ϫ�f� � � � d Z ddlmZ ddlmZ ddlmZ ej � sddlm Z G d� de� Z e� j e j � � y) z& Tests for L{twisted.internet.stdio}. � )�Protocol)�ReactorBuilder)�platform)� StandardIOc �h � e Zd ZdZd� Zd� Zd� Zd� Zd� Zd� Z d� Z d � Z ej � rd Zyy)�StdioFilesTestszI L{StandardIO} supports reading and writing to filesystem files. c �� � | j � }t |d� j � t |d� | _ | j | j j � y )N�wbzrb+)�mktemp�open�close� extraFile� addCleanup)�self�paths �B/usr/lib/python3/dist-packages/twisted/internet/test/test_stdio.py�setUpzStdioFilesTests.setUp sD � ��{�{�}���T�4���� ��d�E�*���������,�,�-� c �� �� | j � � G �fd�dt � }| j � }t |d� 5 }|j d� ddd� t |d� 5 } |� }t ||j � | j j � ��� | j �� ddd� | j j d� y# 1 sw Y ��xY w# 1 sw Y �2xY w)zc Adding a filesystem file reader to a reactor will make sure it is polled. c � �� e Zd ZdZ� fd�Zy)�4StdioFilesTests.test_addReader.<locals>.DataProtocolr c �p �� | xj |z c_ | j dk( r�j � y y )N� hello!)�data�stop)r r �reactors �r �dataReceivedzAStdioFilesTests.test_addReader.<locals>.DataProtocol.dataReceived&