§
    Ètºf™8  ã                  ó|  — d Z ddlmZ ddlZddlZddlZddlmZmZ ddl	m
Z
 ddlmZmZmZmZmZ ddlmZmZ ddlmZ dd	lmZmZ dd
lmZ ddlmZ ddlmZ ddlm Z  ddl!m"Z"m#Z# dZ$ e%ej&        ¦  «        Z'ej(         )                    ej*        ¦  «        e'd<    G d„ dej        ¦  «        Z+ G d„ de#¦  «        Z,dS )z¯
Tests for L{twisted.internet.stdio}.

@var properEnv: A copy of L{os.environ} which has L{bytes} keys/values on POSIX
    platforms and native L{str} keys/values on Windows.
é    )ÚannotationsN)ÚAnyÚCallable)ÚskipIf)ÚdeferÚerrorÚprotocolÚreactorÚstdio)ÚIProcessTransportÚIReactorProcess)ÚProcessProtocol)ÚfilepathÚlog)ÚFailure)ÚrequireModule)Úplatform)ÚConnectionLostNotifyingProtocol)ÚSkipTestÚTestCases   xyz123abc Twisted is great!Ú
PYTHONPATHc                  óF   — e Zd ZU dZdZded<   ded<   dd	„Zd
„ Zd„ Zd„ Z	dS )ÚStandardIOTestProcessProtocolaÕ  
    Test helper for collecting output from a child process and notifying
    something when it exits.

    @ivar onConnection: A L{defer.Deferred} which will be called back with
    L{None} when the connection to the child process is established.

    @ivar onCompletion: A L{defer.Deferred} which will be errbacked with the
    failure associated with the child process exiting when it exits.

    @ivar onDataReceived: A L{defer.Deferred} which will be called back with
    this instance whenever C{childDataReceived} is called, or L{None} to
    suppress these callbacks.

    @ivar data: A C{dict} mapping file descriptors to strings containing all
    bytes received from the child process on each file descriptor.
    Nzdefer.Deferred[None] | NoneÚonDataReceivedr   Ú	transportÚreturnÚNonec                ót   — t          j        ¦   «         | _        t          j        ¦   «         | _        i | _        d S ©N)r   ÚDeferredÚonConnectionÚonCompletionÚdata©Úselfs    úV/var/www/surfInsights/venv3-11/lib/python3.11/site-packages/twisted/test/test_stdio.pyÚ__init__z&StandardIOTestProcessProtocol.__init__=   s-   € Ý27´.Ñ2BÔ2BˆÔÝ27´.Ñ2BÔ2BˆÔØ&(ˆŒ	ˆ	ˆ	ó    c                ó:   — | j                              d ¦  «         d S r   )r!   Úcallbackr$   s    r&   ÚconnectionMadez,StandardIOTestProcessProtocol.connectionMadeB   s   € ØÔ×"Ò" 4Ñ(Ô(Ð(Ð(Ð(r(   c                ó¬   — | j                              |d¦  «        |z   | j         |<   | j        �&| j        dc}| _        |                     | ¦  «         dS dS )z“
        Record all bytes received from the child process in the C{data}
        dictionary.  Fire C{onDataReceived} if it is not L{None}.
        r(   N)r#   Úgetr   r*   )r%   ÚnameÚbytesÚds       r&   ÚchildDataReceivedz/StandardIOTestProcessProtocol.childDataReceivedE   s_   € ð
 œ)Ÿ-š-¨¨cÑ2Ô2°UÑ:ˆŒ	�$‰ØÔÐ*Ø%)Ô%8¸$Ð"ˆAˆtÔ"Ø�JŠJ�tÑÔÐÐÐð +Ð*r(   c                ó:   — | j                              |¦  «         d S r   )r"   r*   )r%   Úreasons     r&   ÚprocessEndedz*StandardIOTestProcessProtocol.processEndedO   s   € ØÔ×"Ò" 6Ñ*Ô*Ð*Ð*Ð*r(   )r   r   )
Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   Ú__annotations__r'   r+   r1   r4   © r(   r&   r   r   '   s€   € € € € € € ðð ð$ 37€NÐ6Ð6Ð6Ñ6Ø Ð Ð Ñ ð)ð )ð )ð )ð
)ð )ð )ðð ð ð+ð +ð +ð +ð +r(   r   c                  óî   — e Zd Z ej        ¦   «         r ed¦  «        €dZd&d„Zd'd„Zd„ Z		 d(d)d„Z
d*d„Zd*d„Zd*d„Zd„ Zd„ Zd„ Zd „ Zd!„ Zd"„ Zd#„ Z e ej        ¦   «         d$¦  «        d%„ ¦   «         ZdS )+ÚStandardInputOutputTestsÚwin32processNzIOn windows, spawnProcess is not available in the absence of win32process.Úprotor   Úsiblingústr | bytesÚargsÚstrÚkwr   r   r   c                ó  — t          |t          ¦  «        r|                     ¦   «         }t          j        dd|z   t
          j        j        gt          |¦  «        z   } t          t
          ¦  «        j
        |t          j        |fdt          i|¤ŽS )ak  
        Launch a child Python process and communicate with it using the given
        ProcessProtocol.

        @param proto: A L{ProcessProtocol} instance which will be connected to
            the child process.

        @param sibling: The basename of a file containing the Python program to
            run in the child process.

        @param *args: strings which will be passed to the child process on the
            command line as C{argv[2:]}.

        @param **kw: additional arguments to pass to L{reactor.spawnProcess}.

        @return: The L{IProcessTransport} provider for the spawned process.
        z-mztwisted.test.Úenv)Ú
isinstancer/   ÚdecodeÚsysÚ
executabler
   Ú	__class__r6   Úlistr   ÚspawnProcessÚ	properEnv)r%   r>   r?   rA   rC   Úprocargss         r&   Ú_spawnProcessz&StandardInputOutputTests._spawnProcessZ   s”   € õ( �g�uÑ%Ô%ð 	'Ø—n’nÑ&Ô&ˆGåŒNØØ˜gÑ%ÝÔÔ(ð	
õ
 �‰JŒJñˆð 5��wÑ'Ô'Ô4Ø•3”> 8ð
ð 
Ý1:ð
Ø>@ð
ð 
ð 	
r(   r0   údefer.Deferred[None]r*   úCallable[[Failure], object]c                óF   ‡ ‡— ˆ fd„}ˆfd„}|                      ||¦  «        S )Nc                ó8   •— ‰                      d| ›�¦  «         d S )Nz%Process terminated with non-Failure: )Úfail)Úresultr%   s    €r&   Úcbz4StandardInputOutputTests._requireFailure.<locals>.cb}   s$   ø€ Ø�IŠIÐH¸fÐHÐHÑIÔIÐIÐIÐIr(   c                ó   •—  ‰| ¦  «        S r   r:   )Úerrr*   s    €r&   Úebz4StandardInputOutputTests._requireFailure.<locals>.eb€   s   ø€ Ø�8˜C‘=”=Ð r(   )ÚaddCallbacks)r%   r0   r*   rV   rY   s   ` `  r&   Ú_requireFailurez(StandardInputOutputTests._requireFailurez   sQ   øø€ ð	Jð 	Jð 	Jð 	Jð 	Jð	!ð 	!ð 	!ð 	!ð 	!ð �~Š~˜b "Ñ%Ô%Ð%r(   c                óð   ‡ ‡‡— ‰                       ¦   «         Št          j        d‰z   ¦  «         t          ¦   «         Š‰j        }‰                      ‰d‰¦  «         ˆˆˆ fd„}‰                      ||¦  «        S )z„
        Verify that a protocol connected to L{StandardIO} can disconnect
        itself using C{transport.loseConnection}.
        zChild process logging to s   stdio_test_loseconnc                ó(  •— t          ‰¦  «        5 }|D ]+}t          j        d|                     ¦   «         z   ¦  «         Œ,	 d d d ¦  «         n# 1 swxY w Y   ‰                     d‰j        ¦  «         |                      t          j        ¦  «         d S )NzChild logged: é   )	Úopenr   ÚmsgÚrstripÚfailIfInr#   Útrapr   ÚProcessDone)r3   ÚfÚlineÚerrorLogFileÚpr%   s      €€€r&   r4   zBStandardInputOutputTests.test_loseConnection.<locals>.processEnded�   sË   ø€ å�lÑ#Ô#ð > qØð >ð >�DÝ”GÐ,¨t¯{ª{©}¬}Ñ<Ñ=Ô=Ð=Ð=ð>ð>ð >ð >ñ >ô >ð >ð >ð >ð >ð >ð >øøøð >ð >ð >ð >ð �MŠM˜!˜QœVÑ$Ô$Ð$Ø�KŠK�Ô)Ñ*Ô*Ð*Ð*Ð*s   ‘/AÁAÁA)Úmktempr   r`   r   r"   rO   r[   )r%   r0   r4   rg   rh   s   `  @@r&   Útest_loseConnectionz,StandardInputOutputTests.test_loseConnection…   s�   øøø€ ð
 —{’{‘}”}ˆÝŒÐ+¨lÑ:Ñ;Ô;Ð;Ý)Ñ+Ô+ˆØŒNˆØ×Ò˜1Ð4°lÑCÔCÐCð	+ð 	+ð 	+ð 	+ð 	+ð 	+ð 	+ð ×#Ò# A |Ñ4Ô4Ð4r(   FÚexampleÚoutÚboolc                ó*  ‡‡— |                       ¦   «         }t          ¦   «         Št          j        ¦   «         ‰_        dˆˆfd„}‰j                             |¦  «         d„ }|                      ‰j        |¦  «        }|                      ‰||¦  «         |S )NÚignoredr   r   rP   c                ó€   •— ‰j         }‰r‰j                             ¦   «          n‰j                             ¦   «          |S r   )r"   r   ÚcloseStdoutÚ
closeStdin)ro   r0   rl   rh   s     €€r&   ÚcbByteszGStandardInputOutputTests.exampleOutputsAndZeroExitCode.<locals>.cbBytes¢   sB   ø€ Ø”ˆAØð )Ø”×'Ò'Ñ)Ô)Ð)Ð)à”×&Ò&Ñ(Ô(Ð(ØˆHr(   c                óD   — |                       t          j        ¦  «         d S r   )rc   r   rd   )r3   s    r&   r4   zLStandardInputOutputTests.exampleOutputsAndZeroExitCode.<locals>.processEnded¬   s   € Ø�KŠK�Ô)Ñ*Ô*Ð*Ð*Ð*r(   )ro   r   r   rP   )ri   r   r   r    r   ÚaddCallbackr[   rO   )r%   rk   rl   rg   rs   r4   r0   rh   s     `    @r&   ÚexampleOutputsAndZeroExitCodez6StandardInputOutputTests.exampleOutputsAndZeroExitCode›   s°   øø€ ð —{’{‘}”}ˆÝ)Ñ+Ô+ˆÝ œ>Ñ+Ô+ˆÔð	ð 	ð 	ð 	ð 	ð 	ð 	ð 	
Ô×$Ò$ WÑ-Ô-Ð-ð	+ð 	+ð 	+ð × Ò  Ô!1°<Ñ@Ô@ˆà×Ò˜1˜g |Ñ4Ô4Ð4Øˆr(   c                ó,   — |                       d¦  «        S )z´
        When stdin is closed and the protocol connected to it implements
        L{IHalfCloseableProtocol}, the protocol's C{readConnectionLost} method
        is called.
        Ústdio_test_halfclose©rv   r$   s    r&   Útest_readConnectionLostz0StandardInputOutputTests.test_readConnectionLost´   s   € ð ×1Ò1Ð2HÑIÔIÐIr(   c                ó,   — |                       d¦  «        S )úë
        When stdin is closed and the protocol connnected to it implements
        L{IHalfCloseableProtocol} but its C{readConnectionLost} method raises
        an exception its regular C{connectionLost} method will be called.
        Ústdio_test_halfclose_buggyry   r$   s    r&   Útest_buggyReadConnectionLostz5StandardInputOutputTests.test_buggyReadConnectionLost¼   s   € ð ×1Ò1Ð2NÑOÔOÐOr(   c                ó0   — |                       dd¬¦  «        S )r|   Ú stdio_test_halfclose_buggy_writeT)rl   ry   r$   s    r&   Útest_buggyWriteConnectionLostz6StandardInputOutputTests.test_buggyWriteConnectionLostÄ   s&   € ð ×1Ò1Ø.°Dð 2ñ 
ô 
ð 	
r(   c                ó   ‡ ‡— t          ¦   «         Š	 ‰                      ‰dt          d¬¦  «         n.# t          $ r!}t	          t          |¦  «        ¦  «        ‚d}~ww xY wˆˆ fd„}‰                      ‰j        |¦  «        S )z¶
        Verify that a write made directly to stdout using L{os.write}
        after StandardIO has finished is reliably received by the
        process reading that stdout.
        s   stdio_test_lastwriteT)ÚusePTYNc                óÊ   •— ‰                      ‰j        d                              t          ¦  «        d‰j        ›d�¦  «         |                      t
          j        ¦  «         dS )z‰
            Asserts that the parent received the bytes written by the child
            immediately after the child starts.
            r^   z	Received z) from child, did not find expected bytes.N)Ú
assertTruer#   ÚendswithÚUNIQUE_LAST_WRITE_STRINGrc   r   rd   ©r3   rh   r%   s    €€r&   r4   zEStandardInputOutputTests.test_lastWriteReceived.<locals>.processEndedè   s`   ø€ ð
 �OŠOØ”�q”	×"Ò"Õ#;Ñ<Ô<ØO˜AœFÐOÐOÐOñô ð ð �KŠK�Ô)Ñ*Ô*Ð*Ð*Ð*r(   )r   rO   r‡   Ú
ValueErrorr   rB   r[   r"   )r%   Úer4   rh   s   `  @r&   Útest_lastWriteReceivedz/StandardInputOutputTests.test_lastWriteReceivedÎ   s°   øø€ õ *Ñ+Ô+ˆð	#Ø×ÒØÐ*Õ,DÈTð ñ ô ð ð øõ ð 	#ð 	#ð 	#å�3˜q™6œ6Ñ"Ô"Ð"øøøøð	#øøøð		+ð 		+ð 		+ð 		+ð 		+ð 		+ð ×#Ò# A¤N°LÑAÔAÐAs   ’1 ±
A»AÁAc                ó”   ‡ ‡— t          ¦   «         Š‰j        }‰                      ‰d¦  «         ˆˆ fd„}‰                      ||¦  «        S )zƒ
        Verify that the transport of a protocol connected to L{StandardIO}
        has C{getHost} and C{getPeer} methods.
        s   stdio_test_hostpeerc                óÞ   •— ‰j         d                              ¦   «         \  }}‰                     |¦  «         ‰                     |¦  «         |                      t          j        ¦  «         d S )Nr^   )r#   Ú
splitlinesr…   rc   r   rd   )r3   ÚhostÚpeerrh   r%   s      €€r&   r4   z?StandardInputOutputTests.test_hostAndPeer.<locals>.processEndedþ   s]   ø€ Øœ œ×-Ò-Ñ/Ô/‰JˆD�$Ø�OŠO˜DÑ!Ô!Ð!Ø�OŠO˜DÑ!Ô!Ð!Ø�KŠK�Ô)Ñ*Ô*Ð*Ð*Ð*r(   ©r   r"   rO   r[   ©r%   r0   r4   rh   s   `  @r&   Útest_hostAndPeerz)StandardInputOutputTests.test_hostAndPeerõ   se   øø€ õ
 *Ñ+Ô+ˆØŒNˆØ×Ò˜1Ð4Ñ5Ô5Ð5ð	+ð 	+ð 	+ð 	+ð 	+ð 	+ð ×#Ò# A |Ñ4Ô4Ð4r(   c                ó”   ‡ ‡— t          ¦   «         Š‰j        }‰                      ‰d¦  «         ˆˆ fd„}‰                      ||¦  «        S )z�
        Verify that the C{write} method of the transport of a protocol
        connected to L{StandardIO} sends bytes to standard out.
        s   stdio_test_writec                óˆ   •— ‰                      ‰j        d         d¦  «         |                      t          j        ¦  «         d S ©Nr^   s   ok!©ÚassertEqualr#   rc   r   rd   rˆ   s    €€r&   r4   z9StandardInputOutputTests.test_write.<locals>.processEnded  ó:   ø€ Ø×Ò˜QœV AœY¨Ñ/Ô/Ð/Ø�KŠK�Ô)Ñ*Ô*Ð*Ð*Ð*r(   r‘   r’   s   `  @r&   Ú
test_writez#StandardInputOutputTests.test_write  se   øø€ õ
 *Ñ+Ô+ˆØŒNˆà×Ò˜1Ð1Ñ2Ô2Ð2ð	+ð 	+ð 	+ð 	+ð 	+ð 	+ð ×#Ò# A |Ñ4Ô4Ð4r(   c                ó”   ‡ ‡— t          ¦   «         Š‰j        }‰                      ‰d¦  «         ˆˆ fd„}‰                      ||¦  «        S )z˜
        Verify that the C{writeSequence} method of the transport of a
        protocol connected to L{StandardIO} sends bytes to standard out.
        s   stdio_test_writeseqc                óˆ   •— ‰                      ‰j        d         d¦  «         |                      t          j        ¦  «         d S r–   r—   rˆ   s    €€r&   r4   zAStandardInputOutputTests.test_writeSequence.<locals>.processEnded   r™   r(   r‘   r’   s   `  @r&   Útest_writeSequencez+StandardInputOutputTests.test_writeSequence  se   øø€ õ
 *Ñ+Ô+ˆØŒNˆà×Ò˜1Ð4Ñ5Ô5Ð5ð	+ð 	+ð 	+ð 	+ð 	+ð 	+ð ×#Ò# A |Ñ4Ô4Ð4r(   c                óÖ   — |                       ¦   «         }t          |d¦  «        5 }t          d¦  «        D ]}|                     d|fz  ¦  «         Œ	 d d d ¦  «         n# 1 swxY w Y   |S )NÚwbi   ó   %d
)ri   r_   ÚrangeÚwrite)r%   ÚjunkPathÚjunkFileÚis       r&   Ú	_junkPathz"StandardInputOutputTests._junkPath&  s­   € Ø—;’;‘=”=ˆÝ�(˜DÑ!Ô!ð 	/ XÝ˜4‘[”[ð /ð /�Ø—’˜w¨!¨™~Ñ.Ô.Ð.Ð.ð/ð	/ð 	/ð 	/ñ 	/ô 	/ð 	/ð 	/ð 	/ð 	/ð 	/ð 	/øøøð 	/ð 	/ð 	/ð 	/ð ˆs   ¥,AÁA"Á%A"c                ó   ‡ ‡‡‡‡‡— t          ¦   «         Š‰j        }g Št          t          d¦  «        ¦  «        Šˆˆˆˆfd„Š‰                      ‰d¦  «        Š‰j                             ‰¦  «         ˆˆ ˆˆfd„}‰                      ||¦  «        S )z€
        Verify that the transport of a protocol connected to L{StandardIO}
        is a working L{IProducer} provider.
        éd   c                óÈ   •— ‰r^‰                      d‰                     ¦   «         fz  ¦  «         ‰                     ‰d         ¦  «         t          j        d‰d ¦  «         d S d S )Nr    éÿÿÿÿg{®Gáz„?)ÚappendÚpopr¢   r
   Ú	callLater)Úignr+   ÚprocÚtoWriteÚwrittens    €€€€r&   r+   z>StandardInputOutputTests.test_producer.<locals>.connectionMade8  sh   ø€ Øð >Ø—’˜w¨'¯+ª+©-¬-Ð)9Ñ9Ñ:Ô:Ð:Ø—
’
˜7 2œ;Ñ'Ô'Ð'ÝÔ! $¨¸Ñ=Ô=Ð=Ð=Ð=ð>ð >r(   s   stdio_test_producerc                óü   •— ‰                      ‰j        d         d                     ‰¦  «        ¦  «         ‰                     ‰dt	          ‰¦  «        fz  ¦  «         |                      t          j        ¦  «         d S )Nr^   r(   z*Connection lost with %d writes left to go.)r˜   r#   ÚjoinÚassertFalseÚlenrc   r   rd   )r3   rh   r%   r°   r±   s    €€€€r&   r4   z<StandardInputOutputTests.test_producer.<locals>.processEndedB  ss   ø€ Ø×Ò˜QœV AœY¨¯ª°Ñ(9Ô(9Ñ:Ô:Ð:Ø×ÒØÐEÍÈWÉÌÈÑWñô ð ð �KŠK�Ô)Ñ*Ô*Ð*Ð*Ð*r(   )r   r"   rK   r¡   rO   r!   ru   r[   )r%   r0   r4   r+   rh   r¯   r°   r±   s   `  @@@@@r&   Útest_producerz&StandardInputOutputTests.test_producer-  sÊ   øøøøøø€ õ
 *Ñ+Ô+ˆØŒNˆàˆÝ•u˜S‘z”zÑ"Ô"ˆð	>ð 	>ð 	>ð 	>ð 	>ð 	>ð 	>ð 	>ð ×!Ò! !Ð%;Ñ<Ô<ˆà	Œ×"Ò" >Ñ2Ô2Ð2ð	+ð 	+ð 	+ð 	+ð 	+ð 	+ð 	+ð 	+ð ×#Ò# A |Ñ4Ô4Ð4r(   c                óÂ   ‡ ‡‡— t          ¦   «         Š‰j        }‰                      ¦   «         Š‰                      ‰d‰¦  «         ˆˆˆ fd„}‰                      ||¦  «        S )z€
        Verify that the transport of a protocol connected to L{StandardIO}
        is a working L{IConsumer} provider.
        s   stdio_test_consumerc                óü   •— t          ‰d¦  «        5 }‰                     ‰j        d         |                     ¦   «         ¦  «         d d d ¦  «         n# 1 swxY w Y   |                      t
          j        ¦  «         d S )NÚrbr^   )r_   r˜   r#   Úreadrc   r   rd   )r3   re   r£   rh   r%   s     €€€r&   r4   z<StandardInputOutputTests.test_consumer.<locals>.processEndedW  s¤   ø€ Ý�h Ñ%Ô%ð 6¨Ø× Ò  ¤¨¤¨A¯FªF©H¬HÑ5Ô5Ð5ð6ð 6ð 6ñ 6ô 6ð 6ð 6ð 6ð 6ð 6ð 6øøøð 6ð 6ð 6ð 6à�KŠK�Ô)Ñ*Ô*Ð*Ð*Ð*s   ’4AÁAÁA)r   r"   r¦   rO   r[   )r%   r0   r4   r£   rh   s   `  @@r&   Útest_consumerz&StandardInputOutputTests.test_consumerK  s|   øøø€ õ
 *Ñ+Ô+ˆØŒNˆà—>’>Ñ#Ô#ˆà×Ò˜1Ð4°hÑ?Ô?Ð?ð	+ð 	+ð 	+ð 	+ð 	+ð 	+ð 	+ð
 ×#Ò# A |Ñ4Ô4Ð4r(   zpStandardIO does not accept stdout as an argument to Windows.  Testing redirection to a file is therefore harder.c                óð  ‡ ‡‡	‡
‡‡— t          j        ¦   «         }t          |¦  «        }t          j        ‰                      ¦   «         ¦  «        Š‰                     d¦  «        x‰ _        }‰                      |j	        ¦  «         t          |                     ¦   «         ¬¦  «        }t          j        ¦   «         s[t          j        ¦   «         \  }}‰                      t          j	        |¦  «         ‰                      t          j	        |¦  «         ||d<   t!          j        |fi |¤ŽŠdŠ
t%          j        ¦   «         Š	ˆˆ	ˆ
ˆfd„Št)          j        d‰¦  «         ˆ	ˆ
ˆˆ fd„}|                     |¦  «         |S )aE  
        If L{StandardIO} is created with a file descriptor which refers to a
        normal file (ie, a file from the filesystem), L{StandardIO.write}
        writes bytes to that file.  In particular, it does not immediately
        consider the file closed or call its protocol's C{connectionLost}
        method.
        rŸ   )ÚstdoutÚstdiné   c                 ó¨   •— ‰D ]8} | ‰k    r‰                      ¦   «           d S ‰                     d| fz  ¦  «          t          j        d‰¦  «         d S )Nó   %dr   )ÚloseConnectionr¢   r
   r­   )ÚvalueÚ
connectionÚcountÚhowManyÚspins    €€€€r&   rÇ   zAStandardInputOutputTests.test_normalFileStandardOut.<locals>.spin‚  sm   ø€ Øð ð �Ø˜GÒ#Ð#Ø×-Ò-Ñ/Ô/Ð/Ø�F�FØ× Ò  ¨%¨Ñ!1Ñ2Ô2Ð2ØÝÔ˜a Ñ&Ô&Ð&Ð&Ð&r(   r   c           	     óø   •— ‰                      t          ‰¦  «        ‰dz   ¦  «         ‰                      ‰                     ¦   «         d                     d„ t	          ‰¦  «        D ¦   «         ¦  «        ¦  «         d S )Nr^   r(   c              3  ó"   K  — | ]
}d |fz  V — ŒdS )rÁ   Nr:   )Ú.0r¥   s     r&   ú	<genexpr>zVStandardInputOutputTests.test_normalFileStandardOut.<locals>.cbLost.<locals>.<genexpr>’  s(   è è € Ð+QÐ+Q¸Q¨E°Q°D©LÐ+QÐ+QÐ+QÐ+QÐ+QÐ+Qr(   )r˜   ÚnextÚ
getContentr³   r¡   )r3   rÅ   rÆ   Úpathr%   s    €€€€r&   ÚcbLostzCStandardInputOutputTests.test_normalFileStandardOut.<locals>.cbLost�  su   ø€ Ø×Ò�T %™[œ[¨'°A©+Ñ6Ô6Ð6Ø×ÒØ—’Ñ!Ô! 3§8¢8Ð+QÐ+QÅ%ÈÁ.Ä.Ð+QÑ+QÔ+QÑ#QÔ#Qñô ð ð ð r(   )r   r    r   r   ÚFilePathri   r_   ÚnormalÚ
addCleanupÚcloseÚdictÚfilenor   Ú	isWindowsÚosÚpiper   Ú
StandardIOÚ	itertoolsrÅ   r
   r­   ru   )r%   Ú
onConnLostr>   rÑ   ÚkwargsÚrÚwrÏ   rÄ   rÅ   rÆ   rÎ   rÇ   s   `       @@@@@r&   Útest_normalFileStandardOutz3StandardInputOutputTests.test_normalFileStandardOut^  s‚  øøøøøø€ õ ”^Ñ%Ô%ˆ
Ý/°
Ñ;Ô;ˆÝÔ  §¢¡¤Ñ/Ô/ˆØ#Ÿyšy¨™œÐ.ˆŒ�fØ�Š˜œÑ%Ô%Ð%å˜VŸ]š]™_œ_Ð-Ñ-Ô-ˆÝÔ!Ñ#Ô#ð 	 õ ”7‘9”9‰DˆAˆqØ�OŠO�BœH aÑ(Ô(Ð(Ø�OŠO�BœH aÑ(Ô(Ð(ØˆF�7‰OÝÔ% eÐ6Ð6¨vÐ6Ð6ˆ
ð ˆÝ”Ñ!Ô!ˆð	'ð 	'ð 	'ð 	'ð 	'ð 	'ð 	'ð 	'õ 	Ô˜!˜TÑ"Ô"Ð"ð	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	×Ò˜vÑ&Ô&Ð&ØÐr(   )
r>   r   r?   r@   rA   rB   rC   r   r   r   )r0   rP   r*   rQ   r   rP   )F)rk   rB   rl   rm   r   rP   )r   rP   )r5   r6   r7   r   rÖ   r   ÚskiprO   r[   rj   rv   rz   r~   r�   r‹   r“   rš   r�   r¦   r¶   r»   r   rß   r:   r(   r&   r<   r<   S   s„  € € € € € Ø€xÔÑÔð 
  ¨nÑ =Ô =Ð Eð'ð 	ð

ð 
ð 
ð 
ð@	&ð 	&ð 	&ð 	&ð5ð 5ð 5ð. ).ðð ð ð ð ð2Jð Jð Jð JðPð Pð Pð Pð
ð 
ð 
ð 
ð%Bð %Bð %BðN5ð 5ð 5ð"5ð 5ð 5ð 5ð 5ð 5ð ð ð ð5ð 5ð 5ð<5ð 5ð 5ð& €VØˆÔÑÔð	=ñô ð
3ð 3ñô ð
3ð 3ð 3r(   r<   )-r8   Ú
__future__r   rÚ   r×   rH   Útypingr   r   Úunittestr   Útwisted.internetr   r   r	   r
   r   Útwisted.internet.interfacesr   r   Útwisted.internet.protocolr   Útwisted.pythonr   r   Útwisted.python.failurer   Útwisted.python.reflectr   Útwisted.python.runtimer   Útwisted.test.test_tcpr   Útwisted.trial.unittestr   r   r‡   rÔ   ÚenvironrM   Úpathsepr³   rÎ   r   r<   r:   r(   r&   ú<module>rï      sÖ  ððð ð #Ð "Ð "Ð "Ð "Ð "à Ð Ð Ð Ø 	€	€	€	Ø 
€
€
€
Ø  Ð  Ð  Ð  Ð  Ð  Ð  Ð  Ø Ð Ð Ð Ð Ð à CÐ CÐ CÐ CÐ CÐ CÐ CÐ CÐ CÐ CÐ CÐ CÐ CÐ CØ JÐ JÐ JÐ JÐ JÐ JÐ JÐ JØ 5Ð 5Ð 5Ð 5Ð 5Ð 5Ø (Ð (Ð (Ð (Ð (Ð (Ð (Ð (Ø *Ð *Ð *Ð *Ð *Ð *Ø 0Ð 0Ð 0Ð 0Ð 0Ð 0Ø +Ð +Ð +Ð +Ð +Ð +Ø AÐ AÐ AÐ AÐ AÐ AØ 5Ð 5Ð 5Ð 5Ð 5Ð 5Ð 5Ð 5ð :Ð àˆD�”ÑÔ€	Øœ*Ÿ/š/¨#¬(Ñ3Ô3€	ˆ,Ñ ð)+ð )+ð )+ð )+ð )+ HÔ$<ñ )+ô )+ð )+ðXCð Cð Cð Cð C˜xñ Cô Cð Cð Cð Cr(   