
    Yf                     F   d Z ddlZddlmZmZ ddlmZ ddlmZm	Z	 d Z
 G d dej                  Zed	k    rh e	j        ej        d
                                                    ddlmZ  ej         eej        d                               ej                     dS dS )z
Main program for the child process run by
L{twisted.test.test_stdio.StandardInputOutputTests.test_consumer} to test
that process transports implement IConsumer properly.
    N)protocolstdio)basic)logreflectc                 j    t          j        t          j                   t          j        |            d S N)r   startLoggingsysstderrerr)r   s    R/var/www/html/env/lib/python3.11/site-packages/twisted/test/stdio_test_consumer.pyfailedr      s&    SZ   GCLLLLL    c                        e Zd Zd Zd Zd ZdS )ConsumerChildc                     || _         d S r	   )junkPath)selfr   s     r   __init__zConsumerChild.__init__   s     r   c                      t          j                                        t           j        d           j                  }|                    t                     |                     fd           d S )Nrbc                 6    j                                         S r	   )	transportloseConnection)ignr   s    r   <lambda>z.ConsumerChild.connectionMade.<locals>.<lambda>!   s    $."?"?"A"A r   )	r   
FileSenderbeginFileTransferopenr   r   
addErrbackr   addCallback)r   ds   ` r   connectionMadezConsumerChild.connectionMade   sj    00%%t~
 
 	
V	AAAABBBBBr   c                 ,    t          j                     d S r	   )reactorstop)r   reasons     r   connectionLostzConsumerChild.connectionLost#   s    r   N)__name__
__module____qualname__r   r$   r)    r   r   r   r      sD        ! ! !C C C    r   r   __main__   )r&      )__doc__r   twisted.internetr   r   twisted.protocolsr   twisted.pythonr   r   r   Protocolr   r*   namedAnyargvinstallr&   
StandardIOrunr-   r   r   <module>r;      s  
  


 , , , , , , , , # # # # # # ' ' ' ' ' ' ' '  
    H%    zGSXa[!!))+++((((((E]]38A;//000GKMMMMM r   