| 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[� � @ s� d Z ddlmZ ddlmZ ddlmZ ddlmZ zddl m
Z
W n ek
r\ dZ
Y nX G dd � d e�Z
G d
d� dej�ZdS )z+
Tests for L{twisted.internet.serialport}.
� )�unittest)�Failure)�Protocol)�ConnectionDone)�
serialportNc @ s e Zd ZdZdd� Zdd� ZdS )� DoNothingz.
Object with methods that do nothing.
c O s d S �N� )�self�args�kwargsr r �G/usr/lib/python3/dist-packages/twisted/internet/test/test_serialport.py�__init__ s zDoNothing.__init__c C s dd� S )Nc _ s d S r r )r r r r r
�<lambda> � 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 ZdZedkrdZdd� 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 s d S r r �r
r r r
�_finishPortSetup5 s zQSerialPortTests.test_connectionMadeLost.<locals>.DummySerialPort._finishPortSetupN)r r r r Z_serialFactoryr r r r r
�DummySerialPort2 s r c s$ e Zd Z� fdd�Z� fdd�ZdS )z?SerialPortTests.test_connectionMadeLost.<locals>.SerialProtocolc s � � d� d S )N�connectionMade��appendr �Zeventsr r
r ; s zNSerialPortTests.test_connectionMadeLost.<locals>.SerialProtocol.connectionMadec s � � d|f� d S )N�connectionLostr )r
�reasonr r r
r >