https://t.me/RX1948
Server : LiteSpeed
System : Linux host 5.15.0-161-generic #171-Ubuntu SMP Sat Oct 11 08:17:01 UTC 2025 x86_64
User : idnco5810 ( 1093)
PHP Version : 8.2.29
Disable Function : NONE
Directory :  /lib/python3/dist-packages/twisted/internet/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/twisted/internet/test/__pycache__/test_serialport.cpython-310.pyc
o

�b��@s�dZddlmZddlmZddlmZddlmZzddl	m
ZWney-dZ
YnweZ
Gdd	�d	�Z
Gd
d�dej�ZdS)z+
Tests for L{twisted.internet.serialport}.
�)�ConnectionDone)�Protocol)�Failure)�unittest)�
serialportNc@s eZdZdZdd�Zdd�ZdS)�	DoNothingz.
    Object with methods that do nothing.
    cO�dS�N�)�self�args�kwargsr
r
�G/usr/lib/python3/dist-packages/twisted/internet/test/test_serialport.py�__init__�zDoNothing.__init__cCsdd�S)Nc_rr	r
)rr
r
r
r�<lambda>sz'DoNothing.__getattr__.<locals>.<lambda>r
)r�attrr
r
r�__getattr__szDoNothing.__getattr__N)�__name__�
__module__�__qualname__�__doc__rrr
r
r
rrsrc@s$eZdZdZedurdZdd�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.csvGdd�dtj�}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@seZdZeZdd�ZdS)z@SerialPortTests.test_connectionMadeLost.<locals>.DummySerialPortcSrr	r
�rr
r
r�_finishPortSetup4rzQSerialPortTests.test_connectionMadeLost.<locals>.DummySerialPort._finishPortSetupN)rrrr�_serialFactoryrr
r
r
r�DummySerialPort1srcs$eZdZ�fdd�Z�fdd�ZdS)z?SerialPortTests.test_connectionMadeLost.<locals>.SerialProtocolcs��d�dS)N�connectionMade��appendr��eventsr
rr:szNSerialPortTests.test_connectionMadeLost.<locals>.SerialProtocol.connectionMadecs��d|f�dS)N�connectionLostr)r�reasonr r
rr"=szNSerialPortTests.test_connectionMadeLost.<locals>.SerialProtocol.connectionLostN)rrrrr"r
r r
r�SerialProtocol9sr$�)�reactorrr"N)r�
SerialPortrr�assertEqualrrr")rrr$�port�fr
r r�test_connectionMadeLost+s

z'SerialPortTests.test_connectionMadeLost)rrrrr�skipr+r
r
r
rr!s
r)r�twisted.internet.errorr�twisted.internet.protocolr�twisted.python.failurer�
twisted.trialr�twisted.internetr�_serialport�ImportErrorr�TestCaserr
r
r
r�<module>s�

https://t.me/RX1948 - 2025