Server IP : 209.38.156.173 / Your IP : 216.73.216.122 [ Web Server : Apache/2.4.52 (Ubuntu) System : Linux lakekumayuhotel 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64 User : root ( 0) PHP Version : 8.1.2-1ubuntu2.22 Disable Function : NONE Domains : 2 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib/python3/dist-packages/twisted/test/__pycache__/ |
Upload File : |
o �b: � @ sz d Z ddlmZ ddlmZ ddlmZ G dd� d�Zdd� Z G d d � d �Z G dd� d�ZG d d� d�ZG dd� d�Z dS )a� I{Private} test utilities for use throughout Twisted's test suite. Unlike C{proto_helpers}, this is no exception to the don't-use-it-outside-Twisted-we-won't-maintain-compatibility rule! @note: Maintainers be aware: things in this module should be gradually promoted to more full-featured test helpers and exposed as public API as your maintenance time permits. In order to be public API though, they need their own test cases. � )�BytesIO)�minidom)�FileWrapperc @ s( e Zd ZdZdd� Zdd� Zdd� ZdS ) �IOPumpz�Utility to pump data between clients and servers for protocol testing. Perhaps this is a utility worthy of being in protocol.py? c C s || _ || _|| _|| _d S )N)�client�server�clientIO�serverIO)�selfr r r r � r �8/usr/lib/python3/dist-packages/twisted/test/testutils.py�__init__ s zIOPump.__init__c C s | � � r | � � sdS dS )z,Pump until there is no more input or output.N)�pump)r r r r �flush! s �zIOPump.flushc C s� | j �d� | j�d� | j �� }| j�� }| j �d� | j�d� | j �� | j�� |D ]}| j�|� q.|D ]}| j�|� q9|sF|rHdS dS )zOMove data back and forth. Returns whether any data was moved. r � )r �seekr �read�truncater �dataReceivedr )r �cData�sData�byter r r r &