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/internet/test/__pycache__/ |
Upload File : |
o �b� � @ s� d Z ddlmZ ddlmZ ddlmZ ddlmZ zddl m Z W n ey- dZ Y nw eZ G dd � d �Z G d d� dej�ZdS )z+ Tests for L{twisted.internet.serialport}. � )�ConnectionDone)�Protocol)�Failure)�unittest)� serialportNc @ s e Zd ZdZdd� Zdd� ZdS )� DoNothingz. Object with methods that do nothing. c O � d S �N� )�self�args�kwargsr r �G/usr/lib/python3/dist-packages/twisted/internet/test/test_serialport.py�__init__ � zDoNothing.__init__c C s dd� S )Nc _ r r r )r r r r r �<lambda> s z'DoNothing.__getattr__.<locals>.<lambda>r )r �attrr r r �__getattr__ s zDoNothing.__getattr__N)�__name__� __module__�__qualname__�__doc__r r r r r r r s r c @ s$ e Zd ZdZedu rdZdd� ZdS )�SerialPortTestszt Minimal testing for Twisted's serial port support. See ticket #2462 for the eventual full test suite. Nz%Serial port support is not available.c sv G dd� dt j�}g � G � fdd�dt�}||� dt� d�}| �� dg� tt� �}|�|� | �� dd|fg� d S ) zr C{connectionMade} and C{connectionLost} are called on the protocol by the C{SerialPort}. c @ s e Zd ZeZdd� ZdS )z@SerialPortTests.test_connectionMadeLost.<locals>.DummySerialPortc S r r r �r r r r �_finishPortSetup4 r zQSerialPortTests.test_connectionMadeLost.<locals>.DummySerialPort._finishPortSetupN)r r r r �_serialFactoryr r r r r �DummySerialPort1 s r c s$ e Zd Z� fdd�Z� fdd�ZdS )z?SerialPortTests.test_connectionMadeLost.<locals>.SerialProtocolc s � � d� d S )N�connectionMade��appendr ��eventsr r r : s zNSerialPortTests.test_connectionMadeLost.<locals>.SerialProtocol.connectionMadec s � � d|f� d S )N�connectionLostr )r �reasonr r r r"