%PDF- %PDF-
Mini Shell

Mini Shell

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

�

Ϫ�fh����dZddlZddlZddlZddlZddlZddlZddlmZddl	Z	ddl
mZddlm
Z
mZmZddlmZmZddlmZmZddlmZdd	lmZdd
lmZddlmZmZddlm Z m!Z!dd
l"m#Z#ddl$m%Z%ddl&m'Z'm(Z(eejR�jU�Z+dZ,dZ-e.ej^�Z0ejbjeejf�e0d<	ddl
m4Z5ejl�dk7rdZ,dZ-e5Z4ddl7m8Z8de:fd�Z;d�Z<Gd�de�Z=Gd�de�Z>Gd�d e>�Z?e@�j�e?j���Gd!�d"e>�ZCe@�j�eCj���Gd#�d$e(�ZDGd%�d&e(�ZEGd'�d(e(�ZFd)ZGd*ZHe<Gd+�d,e'��ZIy#e9$r	dZ4dZ,dZ-Y��wxYw)-z�
Tests for implementations of L{IReactorProcess}.

@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.
�N)�skipIf)�utils)�Deferred�inlineCallbacks�succeed)�ProcessDone�ProcessTerminated)�IProcessTransport�IReactorProcess)�ProcessProtocol)�ReactorBuilder)�
networkString)�FilePath�_asFilesystemBytes)�err�msg)�platform)�Accumulator)�SynchronousTestCase�TestCaseF��
PYTHONPATH��processTz$Cannot change UID/GID except as root)�_getFileActionsz Cannot change UID/GID on Windows�returnc��ddlm}m}||�dtjd�g}tj�r|jd�t|�S)Nr)�
RLIMIT_NOFILE�	getrlimit�SC_OPEN_MAXi()	�resourcerr�os�sysconfr�isMacOSX�append�min)rr�potentialLimitss   �D/usr/lib/python3/dist-packages/twisted/internet/test/test_process.py�_getRealMaxOpenFilesr)9sI��1� ��/��2�B�J�J�}�4M�N�O�����	���v�&�����c�:�tjdk7rd|_|S)z�
    Only run this test on POSIX platforms.

    @param testMethod: A test function, being decorated.

    @return: the C{testMethod} argument.
    �posix�%Test only applies to POSIX platforms.)r"�name�skip)�
testMethods r(�onlyOnPOSIXr1Js��
�w�w�'��A�
���r*c�"�eZdZdZd�Zd�Zd�Zy)� _ShutdownCallbackProcessProtocolz�
    An L{IProcessProtocol} which fires a Deferred when the process it is
    associated with ends.

    @ivar received: A C{dict} mapping file descriptors to lists of bytes
        received from the child process on those file descriptors.
    c� �||_i|_y�N)�whenFinished�received)�selfr6s  r(�__init__z)_ShutdownCallbackProcessProtocol.__init__`s��(�����
r*c�Z�|jj|g�j|�yr5)r7�
setdefaultr%)r8�fd�bytess   r(�childDataReceivedz2_ShutdownCallbackProcessProtocol.childDataReceivedds!���
�
� � ��R�(�/�/��6r*c�:�|jjd�yr5)r6�callback�r8�reasons  r(�processEndedz-_ShutdownCallbackProcessProtocol.processEndedgs�����"�"�4�(r*N)�__name__�
__module__�__qualname__�__doc__r9r>rC�r*r(r3r3Ws����7�)r*r3c��eZdZUdZegZeed<d�Zd�Z	d�Z
d�Zd�Zd�Z
eeed	d
�d
ud�d��Zd
�Zd�Zeej*�d�d��Zed��Zd�Zd�Zeee�d��Zeee�d��Zd�Zy
)�ProcessTestsBuilderBasez�
    Base class for L{IReactorProcess} tests which defines some tests which
    can be applied to PTY or non-PTY uses of C{spawnProcess}.

    Subclasses are expected to set the C{usePTY} attribute to C{True} or
    C{False}.
    �usePTYc�6��t�}t|�}|j���j|ttddg|j
��}|j
tj|��|j�fd��|j��y)z�
        L{IReactorProcess.spawnProcess} connects the protocol passed to it
        to a transport which provides L{IProcessTransport}.
        �-cr*�rKc�$���j�Sr5��stop��ignored�reactors �r(�<lambda>zHProcessTestsBuilderBase.test_processTransportInterface.<locals>.<lambda>��
���'�,�,�.�r*N)rr3�buildReactor�spawnProcess�pyExerK�
assertTruer
�
providedBy�addCallback�
runReactor)r8�ended�protocol�	transportrTs    @r(�test_processTransportInterfacez6ProcessTestsBuilderBase.test_processTransportInterfacews����
�
��3�E�:���#�#�%���(�(��e�e�U�C�0����)�
�	�	
���)�4�4�Y�?�@�	���8�9����� r*c�n������|j��t�}t|��dttj
�z�d������fd�}�j
|�|j�fd��|j��|j�dj�jd��y)a�
        Helper for testing L{IProcessTransport} write functionality.  This
        method spawns a child process and gives C{write} a chance to write some
        bytes to it.  It then verifies that the bytes were actually written to
        it (by relying on the child process to echo them back).

        @param write: A two-argument callable.  This is invoked with a process
            transport and some bytes to write to it.
        shello, worlds2import sys
sys.stdout.write(sys.stdin.readline())
c����j�ttd�g�}	�|��y#t$r tdd�|j	d�YywxYw)NrMz!Unhandled exception while writing�KILL)rXrY�
BaseExceptionr�
signalProcess)r`�bytesToSend�programr_rT�writes �����r(�startupz3ProcessTestsBuilderBase._writeTest.<locals>.startup�sU����,�,�X�u�u�e�W�>U�V�I�
0��i��-�� �
0��D�=�>��'�'��/�
0�s�	+�&A�Ac�$���j�Sr5rPrRs �r(rUz4ProcessTestsBuilderBase._writeTest.<locals>.<lambda>�rVr*r*�N)rWrr3rr"�linesep�callWhenRunningr\r]�assertEqual�joinr7)r8rir^rjrgrhr_rTs `  @@@@r(�
_writeTestz"ProcessTestsBuilderBase._writeTest�s�����#�#�%���
��3�E�:��%�
�b�j�j�(A�A��M��	0�	0�	����(�
���8�9����� �����c�h�h�x�/@�/@��/C�&D�Er*c�,�d�}|j|�y)z~
        L{IProcessTransport.write} writes the specified C{bytes} to the standard
        input of the child process.
        c�&�|j|�yr5�ri�r`rgs  r(riz1ProcessTestsBuilderBase.test_write.<locals>.write�s���O�O�K�(r*N�rq�r8ris  r(�
test_writez"ProcessTestsBuilderBase.test_write�s��	)�	
����r*c�,�d�}|j|�y)z�
        L{IProcessTransport.writeSequence} writes the specified C{list} of
        C{bytes} to the standard input of the child process.
        c�(�|j|g�yr5)�
writeSequencerus  r(riz9ProcessTestsBuilderBase.test_writeSequence.<locals>.write�s���#�#�[�M�2r*Nrvrws  r(�test_writeSequencez*ProcessTestsBuilderBase.test_writeSequence����	3�	
����r*c�,�d�}|j|�y)z�
        L{IProcessTransport.writeToChild} writes the specified C{bytes} to the
        specified file descriptor of the child process.
        c�(�|jd|�y)Nr)�writeToChildrus  r(riz8ProcessTestsBuilderBase.test_writeToChild.<locals>.write�s���"�"�1�k�2r*Nrvrws  r(�test_writeToChildz)ProcessTestsBuilderBase.test_writeToChild�r}r*c�2���fd�}�j|�y)z�
        L{IProcessTransport.writeToChild} raises L{KeyError} if passed a file
        descriptor which is was not set up by L{IReactorProcess.spawnProcess}.
        c���	�jt|jd|�|j|�y#|j|�wxYw)N�
)�assertRaises�KeyErrorr�ri)r`rgr8s  �r(rizIProcessTestsBuilderBase.test_writeToChildBadFileDescriptor.<locals>.write�s=���
-��!�!�(�I�,B�,B�B��T�����,��	����,�s	�"7�A
Nrvrws` r(�"test_writeToChildBadFileDescriptorz:ProcessTestsBuilderBase.test_writeToChildBadFileDescriptor�s���	-�	
����r*�SIGCHLDNz;Platform lacks SIGCHLD, early-spawnProcess test can't work.c�P���|j��|jrd}ni}tj���fd�}t	jtj
|�t
�}�jt|�ttddg|j|���jd��j�s|jd�g}|j|j�|ry|j�fd��|j��|j!|�y)	z�
        If, before the reactor is started with L{IReactorCore.run}, a
        process is started with L{IReactorProcess.spawnProcess} and
        terminates, the process is reaped once the reactor is started.
        Nc�&���j�yr5)�set)�args�signaleds �r(�handlerzGProcessTestsBuilderBase.test_spawnProcessEarlyIsReaped.<locals>.handler�s����L�L�Nr*rMr*)rK�childFDs�xz,Timed out waiting for child process to exit.c�$���j�Sr5rPrRs �r(rUzHProcessTestsBuilderBase.test_spawnProcessEarlyIsReaped.<locals>.<lambda>rVr*)rWrK�	threading�Event�signalr�rrXr3rY�wait�isSet�failr\r%r]rZ)r8r�r�r^�resultrTr�s     @@r(�test_spawnProcessEarlyIsReapedz6ProcessTestsBuilderBase.test_spawnProcessEarlyIsReaped�s�����#�#�%���;�;��H��H��?�?�$��	�	�
�
�f�n�n�g�.��
�����,�U�3��
�E�3���;�;��	�	
�	�
�
�c���~�~���I�I�D�E���
���&�-�-�(��
�	���8�9����� �	
����r*c�������d�ttd�z��t��d}G��fd�dt�}�j	���j�j|�ttd|g�j����fd�}�j|��jt��j�fd	���j��y
)z�
        The C{reason} argument passed to L{IProcessProtocol.processExited} is a
        L{ProcessTerminated} instance if the child process exits with a signal.
        �TERM�SIGsEimport sys
sys.stdout.write('x')
sys.stdout.flush()
sys.stdin.read()
c�.��eZdZ�fd�Zd�Z�fd�Zd�Zy)�DProcessTestsBuilderBase.test_processExitedWithSignal.<locals>.Exiterc�\��td||fz�|jj��y�NzchildDataReceived(%d, %r))rr`rf)r8r<�data�sigNames   �r(r>zVProcessTestsBuilderBase.test_processExitedWithSignal.<locals>.Exiter.childDataReceived7s'����/�2�t�*�<�=����,�,�W�5r*c�"�td|fz�y�N�childConnectionLost(%d)�r)r8r<s  r(�childConnectionLostzXProcessTestsBuilderBase.test_processExitedWithSignal.<locals>.Exiter.childConnectionLost;s���-���5�6r*c�H��td|�d���j|g�y�NzprocessExited(�)�rr@�r8rB�exiteds  �r(�
processExitedzRProcessTestsBuilderBase.test_processExitedWithSignal.<locals>.Exiter.processExited>s$����n�V�J�a�0�1������)r*c�"�td|�d��y�Nz
processEnded(r�r�rAs  r(rCzQProcessTestsBuilderBase.test_processExitedWithSignal.<locals>.Exiter.processEndedGs���m�F�:�Q�/�0r*N�rDrErFr>r�r�rC)r�r�s��r(�Exiterr�6s���
6�
7�
*�
1r*r�rMrNc�V��|\}|jt�|j}tj�r8�j|j��j|jd�y�j|j���j|j�y)Nrl)	�trapr	�valuer�	isWindows�assertIsNoner�ro�exitCode)r��failurerr8�sigNums   ��r(�cbExitedzFProcessTestsBuilderBase.test_processExitedWithSignal.<locals>.cbExitedSs|����J�W�
�L�L�*�+��-�-�C��!�!�#��!�!�#�*�*�-�� � ����q�1�� � ����V�4��!�!�#�,�,�/r*c�$���j�Sr5rP��ignrTs �r(rUzFProcessTestsBuilderBase.test_processExitedWithSignal.<locals>.<lambda>h�
���w�|�|�~�r*N)
�getattrr�rrrWrnrXrYrKr\�
addErrbackrr])r8�sourcer�r�r�rTr�r�s`   @@@@r(�test_processExitedWithSignalz4ProcessTestsBuilderBase.test_processExitedWithSignal"s����
�������1�����
"�	�	1�_�	1�(�#�#�%������ � ��H��
�E�6�"��;�;�	 �	
�	0�&	���8�$����#�����5�6����� r*c�����|j��g���fd�}�j|�|j��|j�dtj
j
d�zg�y)a�
        If a child process exits while a system call is in progress, the system
        call should not be interfered with.  In particular, it should not fail
        with EINTR.

        Older versions of Twisted installed a SIGCHLD handler on POSIX without
        using the feature exposed by the SA_RESTART flag to sigaction(2).  The
        most noticeable problem this caused was for blocking reads and writes to
        sometimes fail with EINTR.
        c���	tjtj��}t	j
|ddg�t	j
|ddgtj��}|j5�j|jj��ddd��j�y#1swY�xYw#�j�wxYw)N�-czimport time; time.sleep(0.1)z)import time; time.sleep(0.5);print('Foo'))�stdout)rY�decode�sys�getfilesystemencoding�
subprocess�Popen�PIPEr�r%�readrQ)�exe�f2rTr�s  ��r(�fzJProcessTestsBuilderBase.test_systemCallUninterruptedByChildExit.<locals>.fzs����
��l�l�3�#<�#<�#>�?��� � �#�t�-K�!L�M��%�%��$�!O�Q�%�?�?����Y�Y�4��M�M�"�)�)�.�.�"2�3�4�����4�4������s$�A3C�6*B9� C�9C�>C�CsFoo�asciiN)rWrnr]ror"rm�encode)r8r�rTr�s  @@r(�'test_systemCallUninterruptedByChildExitz?ProcessTestsBuilderBase.test_systemCallUninterruptedByChildExitls`����#�#�%����	�"	����"����� �����&�2�:�:�+<�+<�W�+E�"E�!F�Gr*r-c	�"�
��td�}tj�\}}|jtj|�|jtj|�d}t�}||z
}tj||�|jtj|�tj��
G�
�fd�dt�}|j���j�j|�ttdd|gt|j��|j!��t#t%�
j'���}gd�}	|j)|j+t#|	|gz��t#|	��y	)
z�
        Processes spawned with spawnProcess() close all extraneous file
        descriptors in the parent.  They do have a stdin, stdout, and stderr
        open.
        zr
import sys
from twisted.internet import process
sys.stdout.write(repr(process._listOpenFDs()))
sys.stdout.flush()�c�2��eZdZW�jZ�fd�Zy)�KProcessTestsBuilderBase.test_openFileDescriptors.<locals>.GatheringProtocolc�&���j�yr5rP�r8rBrTs  �r(rCzXProcessTestsBuilderBase.test_openFileDescriptors.<locals>.GatheringProtocol.processEnded�s������r*N)rDrErFri�outReceivedrC)�outputrTs��r(�GatheringProtocolr��s��� �,�,�K�
r*r�s-WignorerM��envrK�rrl�N)rr"�pipe�
addCleanup�closer)�dup2�io�BytesIOrrWrnrXrY�	properEnvrKr]r��eval�getvaluero�intersection)r8r��r�w�fudgeFactor�hardResourceLimit�
unlikelyFDr��reportedChildFDs�stdFDsr�rTs          @@r(�test_openFileDescriptorsz0ProcessTestsBuilderBase.test_openFileDescriptors�s?����
�
���w�w�y���1�������!�$�������!�$�*��0�2��&��4�
�
����:��������*�-������	��	��#�#�%������ � ����
�K���/���;�;�
	 �	
�	
���� ��t�F�O�O�$5�6�7����
	
����)�)�#�f�
�|�.C�*D�E�s�6�{�	
r*c������d�}�jtd|��jtdd���j��d�_tj���jrdnd��j����fd��}�j�d	�
��jdj��j��y)
z�
        When L{os.execvpe} raises an exception, it will format that exception
        on stderr as UTF-8, regardless of system encoding information.
        c�z�d}t|t�s|jd�}td|d�}t	|�y)Nu<☃>�utf-8z1/0�single)�
isinstance�strr��compiler�)r��kw�filename�codeobjs    r(�execvpez=ProcessTestsBuilderBase.test_errorDuringExec.<locals>.execvpe�s6��'�H��h��,�#�?�?�7�3���e�X�x�8�G���Mr*r�r�c��y)Nr�rHrHr*r(rUz>ProcessTestsBuilderBase.test_errorDuringExec.<locals>.<lambda>�s�r*Trlr�c���G���fd�dt�}�j|�ttddg�j��y)Nc�$��eZdZ��fd�Z�fd�Zy)�[ProcessTestsBuilderBase.test_errorDuringExec.<locals>.whenRunning.<locals>.TracebackCatcherc�4��|�k(r�j|�yyr5rt)r8�childr��
expectedFDr�s   ��r(r>zmProcessTestsBuilderBase.test_errorDuringExec.<locals>.whenRunning.<locals>.TracebackCatcher.childDataReceived�s����
�*����T�*�+r*c�&���j�yr5rPr�s  �r(rCzhProcessTestsBuilderBase.test_errorDuringExec.<locals>.whenRunning.<locals>.TracebackCatcher.processEndeds����L�L�Nr*N)rDrErFr>rC)rr�rTs���r(�TracebackCatcherr�s
���+�#r*rrMr*rN)rrXrYrK)rrr�rTr8s ����r(�whenRunningzAProcessTestsBuilderBase.test_errorDuringExec.<locals>.whenRunning�s@���
#�
#�?�
#�
� � � �"�E�E�5�#�+>�t�{�{�
!�
r*���timeoutu☃N)
�patchr"r�rW�_neverUseSpawnr�r�rKrnr]�assertInr�r�)r8r�rrr�rTs`  @@@r(�test_errorDuringExecz,ProcessTestsBuilderBase.test_errorDuringExec�s����	�	
�
�
�2�y�'�*��
�
�3�/��A��#�#�%��"&���������+�+�Q�1�
�	�	 �	 �	�
!�	�	
������,��
�
�m�*�*�,�f�o�o�.?�@r*c� ����j��G��fd�dt�}|�}�j�j|ttddg�j
���j
�d���j|j�y)	zi
        If a spawned process exits, C{processExited} will be called in a
        timely manner.
        c���eZdZdZ��fd�Zy)�IProcessTestsBuilderBase.test_timelyProcessExited.<locals>.ExitingProtocolFc���d|_�j��j|jjd�y)NTr)r�rQror�r�)�	protoSelfrBrTr8s  ��r(r�zWProcessTestsBuilderBase.test_timelyProcessExited.<locals>.ExitingProtocol.processExiteds.���#'�	� ������ � ����!6�!6��:r*N)rDrErFr�r�)rTr8s��r(�ExitingProtocolrs
����F�
;r*rrMsraise SystemExit(0)rNr	r
N)	rWrrnrXrYrKr]rZr�)r8rr_rTs`  @r(�test_timelyProcessExitedz0ProcessTestsBuilderBase.test_timelyProcessExited
s���
�#�#�%��	;�o�	;�#�$������ � ���
�E�1�2��;�;�	 �	
�	
������,�������(r*c
�Z���dd|�d�g}g�G��fd�dt�}|j��|�}�j�j|ttddj|�gfi|di��|j
��|jd	�d	jj�y
)aT
        Launch a child process, using either the C{uid} or C{gid} argument to
        L{IReactorProcess.spawnProcess} to change either its UID or GID to a
        different value.  If the child process reports this hasn't happened,
        raise an exception to fail the test.

        @param which: Either C{b"uid"} or C{b"gid"}.
        z	import oszraise SystemExit(os.getz() != 1)c���eZdZ��fd�Zy)�@ProcessTestsBuilderBase._changeIDTest.<locals>.CaptureExitStatusc�H���j|��j�yr5)r%rQ)r8rB�	containerrTs  ��r(rCzMProcessTestsBuilderBase._changeIDTest.<locals>.CaptureExitStatus.processEnded7s���� � ��(����r*N)rDrErFrC)rrTs��r(�CaptureExitStatusr6s���
r*rr��
rlrN)
rrWrnrXrYrpr]ror�r�)r8�whichrhrr_rrTs     @@r(�
_changeIDTestz%ProcessTestsBuilderBase._changeIDTest)s�����"9�%��� I�J���	�	��	�
�#�#�%��$�&������� � ���
�D�$�)�)�G�,�-�		
�
�a�j�	
�	
���� �����I�a�L�.�.�7�7�8r*c�&�|jd�y)z�
        If a value is passed for L{IReactorProcess.spawnProcess}'s C{uid}, the
        child process is run with that UID.
        �uidN�r�r8s r(�test_changeUIDz&ProcessTestsBuilderBase.test_changeUIDI���	
���5�!r*c�&�|jd�y)z�
        If a value is passed for L{IReactorProcess.spawnProcess}'s C{gid}, the
        child process is run with that GID.
        �gidNr"r#s r(�test_changeGIDz&ProcessTestsBuilderBase.test_changeGIDQr%r*c����|j��Gd�dt��G��fd�dt�}|�}�j|ttddg|j
��}|j
��t�[ttjj��D]1\}}||ur�tj||�|jd	��3|jd
t|j����y)zY
        If L{IProcessProtocol.processExited} raises an exception, it is logged.
        c��eZdZy)�GProcessTestsBuilderBase.test_processExitedRaises.<locals>.TestExceptionN)rDrErFrHr*r(�
TestExceptionr+as��r*r,c���eZdZ��fd�Zy)�BProcessTestsBuilderBase.test_processExitedRaises.<locals>.Protocolc�4���j��d��)NzprocessedExited raisedrP)r8rBr,rTs  ��r(r�zPProcessTestsBuilderBase.test_processExitedRaises.<locals>.Protocol.processExitedes�������#�$<�=�=r*N)rDrErFr�)r,rTs��r(�Protocolr.ds���
>r*r0rMr*rNNzEAfter processExited raised, transport was left in reapProcessHandlersrl)rW�	ExceptionrrXrYrKr]r�list�reapProcessHandlers�items�unregisterReapProcessHandlerr�ro�len�flushLoggedErrors)r8r0r_r`�pidr�r,rTs      @@r(�test_processExitedRaisesz0ProcessTestsBuilderBase.test_processExitedRaisesYs�����#�#�%��	�I�	�	>��	>�
�:���(�(��e�e�U�C�0����)�
�	�	
���� �
�� $�W�%@�%@�%F�%F�%H� I�
���W��)�+���4�4�S�'�B��	�	�+��	
�	
����C�� 6� 6�}� E�F�Gr*) rDrErFrGr�requiredInterfaces�bool�__annotations__rarqrxr|r�r�rr�r�r�r�r�rr�r�r1rrr�_uidgidSkip�_uidgidSkipReasonr$r(r9rHr*r(rJrJks����*�*���L�!�4F�B	�	�	�
����	�4�(�D�0�E��: �	�: �xH!�T!H�F��H��� �"I�J�M
�K�M
�^�+A��+A�Z)�89�@�K�*�+�"�,�"��K�*�+�"�,�"�#Hr*rJc���eZdZdZdZdZej�rdZndZd�Z	d�Z
d�Zd	�Zd
�Z
d�Zd�Zed
��Zd�Zd�Zd�Zed��Zed��Zed��Zed��Zed��Zed��Zy)�ProcessTestsBuilderzp
    Builder defining tests relating to L{IReactorProcess} for child processes
    which do not have a PTY.
    Fs$twisted.internet.test.process_helperswindowsr*c����	�t��t�t�t�d��G��fd�dt�}d}|j��	�	j�	j|�t
t
d|gt|j���fd�}�j|��fd�}�j|�d	�}�j|��jt��	fd
�}�j|�|j�	�y)z�
        L{IProcessProtocol.childConnectionLost} is called each time a file
        descriptor associated with a child process is closed.
        r�c�"��eZdZ�fd�Z�fd�Zy)�<ProcessTestsBuilder.test_childConnectionLost.<locals>.Closerc�(���j|�yr5�r@)r8r`�	connecteds  �r(�makeConnectionzKProcessTestsBuilder.test_childConnectionLost.<locals>.Closer.makeConnection�s����"�"�9�-r*c�.���|jd�yr5rE�r8�childFD�losts  �r(r�zPProcessTestsBuilder.test_childConnectionLost.<locals>.Closer.childConnectionLost�s����W�
�&�&�t�,r*N)rDrErFrGr�)rFrKs��r(�CloserrC�s
���
.�
-r*rLs,twisted.internet.test.process_loseconnection�-mr�c�V����jd��dj�fd��S)Ns2
r�c����Sr5rH�r�r`s �r(rUzSProcessTestsBuilder.test_childConnectionLost.<locals>.cbConnected.<locals>.<lambda>�����9�r*�rir\�r`rKs`�r(�cbConnectedzAProcessTestsBuilder.test_childConnectionLost.<locals>.cbConnected��%����O�O�F�#���7�&�&�'<�=�=r*c�V����jd��dj�fd��S)Ns1
rlc����Sr5rHrPs �r(rUzRProcessTestsBuilder.test_childConnectionLost.<locals>.lostSecond.<locals>.<lambda>�rQr*rRrSs`�r(�
lostSecondz@ProcessTestsBuilder.test_childConnectionLost.<locals>.lostSecond�rUr*c�&�|jd�y)N�
rt)r`s r(�	lostFirstz?ProcessTestsBuilder.test_childConnectionLost.<locals>.lostFirst�s���O�O�E�"r*c�&���j�yr5rPrRs �r(�cbEndedz=ProcessTestsBuilder.test_childConnectionLost.<locals>.cbEnded������L�L�Nr*N)rrrWrnrXrYr�rKr\r�rr])
r8rL�targetrTrXr[r]rFrKrTs
       @@@r(�test_childConnectionLostz,ProcessTestsBuilder.test_childConnectionLost�s����
�J�	��:�(�*���<��	-�_�	-�A���#�#�%������ � ��H��
�E�6�"���;�;�
	 �	
�	>�	���k�*�	>�	���j�)�	#�	���i�(����S�!�	�	���g�&����� r*c
������t��g�G��fd�dt�}�j���j�j|�t
t
d�jd�jgt�j����fd�}�j|��jt��j�fd���j��y)	z�
        L{IProcessProtocol.processEnded} is called after the child process
        exits and L{IProcessProtocol.childConnectionLost} is called for each of
        its file descriptors.
        c�.��eZdZd�Z�fd�Zd�Z�fd�Zy)�4ProcessTestsBuilder.test_processEnded.<locals>.Enderc�X�td||fz�|jj�yr�)rr`�loseConnection�r8r<r�s   r(r>zFProcessTestsBuilder.test_processEnded.<locals>.Ender.childDataReceived�s$���/�2�t�*�<�=����-�-�/r*c�F��td|fz��j|�yr�)rr%rIs  �r(r�zHProcessTestsBuilder.test_processEnded.<locals>.Ender.childConnectionLost�s����-��
�:�;����G�$r*c�"�td|�d��yr�r�rAs  r(r�zBProcessTestsBuilder.test_processEnded.<locals>.Ender.processExited�s���n�V�J�a�0�1r*c�H��td|�d���j|g�yr�r�)r8rBr^s  �r(rCzAProcessTestsBuilder.test_processEnded.<locals>.Ender.processEnded�s"����m�F�:�Q�/�0�����x�(r*Nr�)r^rKs��r(�Enderrc�s���
0�
%�
2�
)r*rjrM�childr�c�r��|\}|jt��jt��hd��y�N>rrlr�)r�rror�)r�r�rKr8s  ��r(r]z6ProcessTestsBuilder.test_processEnded.<locals>.cbEnded�s*����J�W��L�L��%����S��Y�	�2r*c�$���j�Sr5rPr�s �r(rUz7ProcessTestsBuilder.test_processEnded.<locals>.<lambda>�s
���g�l�l�n�r*N�rrrWrnrXrY�keepStdioOpenProgram�keepStdioOpenArgr�rKr\r�rr])r8rjr]r^rKrTs`  @@@r(�test_processEndedz%ProcessTestsBuilder.test_processEnded�s�����
����	)�O�	)� �#�#�%������ � ��G��
�E�4�4�4�h��@U�@U�V���;�;�
	 �	
�	3�
	���'�"�
�����
���4�5����� r*c�������t��t��g�G���fd�dt�}�j���j�j|�t
t
dd�jd�jgt�j�����fd�}�j|���fd�}�j|��jt��j�fd	���j��y
)z�
        L{IProcessProtocol.processExited} is called when the child process
        exits, even if file descriptors associated with the child are still
        open.
        c�*��eZdZd�Z��fd�Z�fd�Zy)�6ProcessTestsBuilder.test_processExited.<locals>.Waiterc�$�td||fz�yr�r�rfs   r(r>zHProcessTestsBuilder.test_processExited.<locals>.Waiter.childDataReceiveds���/�2�t�*�<�=r*c���td|fz��j|�t��dk(r�jd�yy)Nr��)rr%r6r@)r8rJ�allLostrKs  ��r(r�zJProcessTestsBuilder.test_processExited.<locals>.Waiter.childConnectionLosts=����-��
�:�;����G�$��t�9��>��$�$�T�*�"r*c�|��td|�d���j|g�|jj�yr�)rr@r`rer�s  �r(r�zDProcessTestsBuilder.test_processExited.<locals>.Waiter.processExiteds2����n�V�J�a�0�1������)����-�-�/r*N)rDrErFr>r�r�)ryr�rKs���r(�Waiterrus���
>�
+�
0r*r{s-urMrkr�c�z��|\}|jt�td�����j�g��S)NzcbExited; lost = )r�rrro)r�r�ryrKr8s  ���r(r�z8ProcessTestsBuilder.test_processExited.<locals>.cbExited"s;����J�W��L�L��%��#�D�6�*�+����T�2�&��Nr*c�@���jt��hd��yrm)ror�)rSrKr8s ��r(�	cbAllLostz9ProcessTestsBuilder.test_processExited.<locals>.cbAllLost+s������S��Y�	�2r*c�$���j�Sr5rPr�s �r(rUz8ProcessTestsBuilder.test_processExited.<locals>.<lambda>1r�r*Nro)r8r{r�r~ryr�rKrTs`   @@@@r(�test_processExitedz&ProcessTestsBuilder.test_processExited�s��������*����	0�	0�_�	0� �#�#�%������ � ��H������)�)���%�%�

���;�;�	 �	
� 	�	���8�$�	3�	���9�%����#�����5�6����� r*c�2�t|j��}t|d�5}|jtj
j
|�tj
z�ddd�tjj|�S#1swY�(xYw)zj
        Write the given list of lines to a text file and return the absolute
        path to it.
        �wtN)	r�mktemp�openrir"rmrp�path�abspath)r8�sourceLines�script�
scriptFiles    r(�makeSourceFilez"ProcessTestsBuilder.makeSourceFile5sp��
$�D�K�K�M�2��
�&�$�
�	H�:����R�Z�Z�_�_�[�9�B�J�J�F�G�	H��w�w���v�&�&�	H�	H�s�AB
�
Bc	�t�������d��jdjtjd��ddj�jd��dg��t	j
�d��j
����fd���fd	������fd
�}�j|��j��y)z�
        Spawning a process with an executable which is a script starting
        with an interpreter definition line (#!) uses that interpreter to
        evaluate the script.
        sthis is the shebang outputz#!{}r�z
import syszsys.stdout.write('{}')zsys.stdout.flush()i�c���|\}}}td|||fz��j|���j|d��j|d�y)NzcbProcessExited((%r, %r, %d))r*r)rro)r��outr�coder8�
shebangOutputs    ��r(�cbProcessExitedz9ProcessTestsBuilder.test_shebang.<locals>.cbProcessExitedSsS���!�N�C��d��/�3��T�2B�B�C����S�-�0����S�#�&����T�1�%r*c�(���j�|Sr5rP)�passthroughrTs �r(�shutdownz2ProcessTestsBuilder.test_shebang.<locals>.shutdownZs����L�L�N��r*c���tj����}|j��|j��|j	t
�y)N)rT)r�getProcessOutputAndValue�addBothr\r�r)�dr�rTr�r�s ����r(�startz/ProcessTestsBuilder.test_shebang.<locals>.start^s9����.�.�z�7�K�A�
�I�I�h��
�M�M�/�*�
�L�L��r*N)	r��formatrYr�r"�chmodrWrnr])r8r�r�rTr�r�r�s` @@@@@r(�test_shebangz ProcessTestsBuilder.test_shebang?s����6�
��(�(��
�
�e�l�l�7�3�4��(�/�/�
�0D�0D�W�0M�N�$�	
�
�
�	����U�#��#�#�%��	&�	�	�	����&����� r*c�v���fd�}�j�}|j||��j|�y)z<
        Pause producing and then resume producing.
        c���	t�}|j|ttddg�j��}|j	�|j�|j
�y#|j
�wxYw)NrMr*rN)rrXrYrK�pauseProducing�resumeProducingrQ)rTr_r`r8s   �r(�pauseAndResumezHProcessTestsBuilder.test_pauseAndResumeProducing.<locals>.pauseAndResumelsf���
�*�,��#�0�0��e�e�U�C�%8����1��	��(�(�*��)�)�+����������s�AA(�(A:N)rWrnr])r8r�rTs`  r(�test_pauseAndResumeProducingz0ProcessTestsBuilder.test_pauseAndResumeProducinggs4���
		��#�#�%�������8����� r*c	�<�������d�gd��djtttdd���}t	|t
�r|j
d��j����fd���fd�������fd	�}�j|��j��y
)zq
        Arguments given to spawnProcess are passed to the child process as
        originally intended.
        s!twisted.internet.test.process_cli)shello�"s 	|<>^&s"\\"hello\\"s"foo\ bar baz\""rrl�r�c�x��|\}}}|jd�}|j��j�|�y)N�)�split�popro)�finishedArgsr�rr�r�r8s    ��r(�processFinishedzMProcessTestsBuilder.test_processCommandLineArguments.<locals>.processFinished�s6��� ,��F�C���\�\�%�(�F��J�J�L����T�6�*r*c�(���j�|Sr5rP)r�rTs �r(r�zFProcessTestsBuilder.test_processCommandLineArguments.<locals>.shutdown�s����L�L�N��Mr*c���td�}|j���fd��|j��|j��y)Nc�P��tjtd�g�zt���S)NrM)r�rT)rr�rYr�)�dummyr�rT�uss ���r(rUzZProcessTestsBuilder.test_processCommandLineArguments.<locals>.spawnChild.<locals>.<lambda>�s$���e�<�<��E�2�;��-�9�g��r*)rr\r�)r�r�r�rTr�r�s �����r(�
spawnChildzHProcessTestsBuilder.test_processCommandLineArguments.<locals>.spawnChild�s7�����
�A�
�M�M��
�

�M�M�/�*�
�I�I�h�r*N)
rp�map�chr�ranger�r�r�rWrnr])r8�allCharsr�r�r�rTr�r�s`  @@@@@r(� test_processCommandLineArgumentsz4ProcessTestsBuilder.test_processCommandLineArguments{s~���
2��T���7�7�3�s�E�!�S�M�2�3���h��$��O�O�G�$��#�#�%��	+�	�	 �	 �	���
�+����� r*c����g�G�fd�dt��t��fd��}|j�}|j||�|j	|�tj�tjdg��y)z�
        Process is removed from reapProcessHandler dict before running
        ProcessProtocol.processEnded() callback.
        c�"��eZdZdZd�Z�fd�Zy)�iProcessTestsBuilder.test_process_unregistered_before_protocol_ended_callback.<locals>.TestProcessProtocola7
            Process protocol captures own presence in
            process.reapProcessHandlers at time of .processEnded() callback.

            @ivar deferred: A deferred fired when the .processEnded() callback
                has completed.
            @type deferred: L{Deferred<defer.Deferred>}
            c�"�t�|_yr5)r�deferredr#s r(r9zrProcessTestsBuilder.test_process_unregistered_before_protocol_ended_callback.<locals>.TestProcessProtocol.__init__�s�� (�
��
r*c����ddlm}|j}|j�}|j|vr�jd�n�jd�|jjd�y)z�
                Capture whether the process has already been removed
                from process.reapProcessHandlers.

                @param status: unused
                rrz!process present but should not be�"process already removed as desiredN)�twisted.internetrr3�valuesr`r%r�r@)r8�statusr�handlers�	processes�resultss     �r(rCzvProcessTestsBuilder.test_process_unregistered_before_protocol_ended_callback.<locals>.TestProcessProtocol.processEnded�sW���5�"�6�6��$�O�O�-�	��>�>�Y�.��N�N�#F�G��N�N�#G�H��
�
�&�&�t�,r*N)rDrErFrGr9rC)r�s�r(�TestProcessProtocolr��s���
�
+�
-r*r�c3��K�	��}|j|ttdg�|j��|j�y#t$r}�j	|�Yd}~�0d}~wwxYw#|j�wxYw�w)a
            Launch and wait for a subprocess and allow the TestProcessProtocol
            to capture the order of the .processEnded() callback vs. removal
            from process.reapProcessHandlers.

            @param reactor: Reactor used to spawn the test process and to be
                stopped when checks are complete.
            @type reactor: object providing
                L{twisted.internet.interfaces.IReactorProcess} and
                L{twisted.internet.interfaces.IReactorCore}.
            z	--versionN)rXrYr�r1r%rQ)rT�testProcessProtocol�er�r�s   ��r(�launchProcessAndWaitzjProcessTestsBuilder.test_process_unregistered_before_protocol_ended_callback.<locals>.launchProcessAndWait�sv�����
�&9�&;�#��$�$�'���K�(��
*�2�2�2�������
"����q�!�!��
"������s9�B�2A�B�	A,�A'�"A/�'A,�,A/�/B�Br�N)rrrWrnr]�hamcrest�assert_that�equal_to)r8r�rTr�r�s   @@r(�8test_process_unregistered_before_protocol_ended_callbackzLProcessTestsBuilder.test_process_unregistered_before_protocol_ended_callback�s{�����	-�/�	-�@
�	�
�	�2�#�#�%����� 4�g�>����� ��������C�D�E�	
r*c
���t�}t�x}|_|j��|�_�j
�j|ttdtd�gfd|ji|���fd�}|j|�|j��|jdd�|jdd�|jttt!|j#���d�|jr|j$j'��y|j(j'��y)	a

        Shared code for testing the environment variables
        present in the spawned process.

        The spawned process serializes its environ to stderr or stdout (depending on usePTY)
        which is checked against os.environ of the calling process.
        rMz�import os, sys; env = dict(os.environ); env.pop("LC_CTYPE", None); env.pop("__CF_USER_TEXT_ENCODING", None); sys.stderr.write(str(sorted(env.items())))rKc�&���j�yr5rPr�s �r(r�zBProcessTestsBuilder.checkSpawnProcessEnvironment.<locals>.shutdownr^r*�LC_CTYPEN�__CF_USER_TEXT_ENCODINGr�)rr�
endedDeferredrWr
rnrXrYrrKr�r]r�ror=r��sortedr4�outFr��errF)r8�spawnKwargs�expectedEnv�usePosixSpawnp�pr�r�rTs       @r(�checkSpawnProcessEnvironmentz0ProcessTestsBuilder.checkSpawnProcessEnvironment�s���
�M��&�j�(��A�O��#�#�%��%3�!3�������� � �
�����A��
�		
� �;�;�!	
�"�#	
�(	�	
�	�	�(������ ����
�D�)����1�4�8�����#�f�[�.�.�0�1�2�G�<�!%���A�F�F�O�O��	
�23�&�&�/�/�2C�	
r*c�*�|j||d��S)NT�r��r��r8r�r�s   r(�+checkSpawnProcessEnvironmentWithPosixSpawnpz?ProcessTestsBuilder.checkSpawnProcessEnvironmentWithPosixSpawnps!���0�0���T�1�
�	
r*c�*�|j||d��S)NFr�r�r�s   r(�$checkSpawnProcessEnvironmentWithForkz8ProcessTestsBuilder.checkSpawnProcessEnvironmentWithFork"s!���0�0���U�1�
�	
r*c�&�|jii�S)a	
        An empty environment is passed to the spawned process, when the default value of the C{env}
        is used. That is, when the C{env} argument is not explicitly set.

        In this case posix_spawnp is used as the backend for spawning processes.
        �r�r#s r(�$test_environmentPosixSpawnpEnvNotSetz8ProcessTestsBuilder.test_environmentPosixSpawnpEnvNotSet's���?�?��B�G�Gr*c�&�|jii�S)a	
        An empty environment is passed to the spawned process, when the default value of the C{env}
        is used. That is, when the C{env} argument is not explicitly set.

        In this case fork+execvpe is used as the backend for spawning processes.
        �r�r#s r(�test_environmentForkEnvNotSetz1ProcessTestsBuilder.test_environmentForkEnvNotSet1s���8�8��R�@�@r*c�F�|jdditj�S)z�
        The parent process environment is passed to the spawned process, when C{env} is set to
        C{None}.

        In this case posix_spawnp is used as the backend for spawning processes.
        r�N)r�r"�environr#s r(�"test_environmentPosixSpawnpEnvNonez6ProcessTestsBuilder.test_environmentPosixSpawnpEnvNone;s$���?�?�
�D�M�2�:�:�
�	
r*c�F�|jdditj�S)z�
        The parent process environment is passed to the spawned process, when C{env} is set to
        C{None}.

        In this case fork+execvpe is used as the backend for spawning processes.
        r�N)r�r"r�r#s r(�test_environmentForkEnvNonez/ProcessTestsBuilder.test_environmentForkEnvNoneGs���8�8�%����
�
�S�Sr*c�2�|jdddiiddi�S)z�
        The user-specified environment without extra variables from parent process is passed to the
        spawned process, when C{env} is set to a dictionary.

        In this case posix_spawnp is used as the backend for spawning processes.
        r��MYENV1�myvalue1r�r#s r(�$test_environmentPosixSpawnpEnvCustomz8ProcessTestsBuilder.test_environmentPosixSpawnpEnvCustomQs,���?�?�
�X�z�*�+�
�z�"�
�	
r*c�2�|jdddiiddi�S)z�
        The user-specified environment without extra variables from parent process is passed to the
        spawned process, when C{env} is set to a dictionary.

        In this case fork+execvpe is used as the backend for spawning processes.
        r�r�r�r�r#s r(�test_environmentForkEnvCustomz1ProcessTestsBuilder.test_environmentForkEnvCustom^s,���8�8�
�X�z�*�+�
�z�"�
�	
r*N)rDrErFrGrKrprr�rqr`rrr�r�r�r�r�r1r�r�r�r�r�r�r�r�r�r�rHr*r(r@r@s����
�F�B���x����%����2!�j-!�d<!�|'�&!�P!�(%!�N�H
��H
�T.
�`
�

�
�H��H��A��A��	
��	
��T��T��

��

��

��

r*r@c�l�eZdZdZdZej�rdZyej�rdZddiZ	yy)�PTYProcessTestsBuilderzi
    Builder defining tests relating to L{IReactorProcess} for child processes
    which have a PTY.
    Tz"PTYs are not supported on Windows.z,PTYs are flaky from a Darwin bug. See #8840.z(twisted.internet.pollreactor.PollReactorz$macOS's poll() does not support PTYsN)
rDrErFrGrKrr�r/r$�skippedReactorsrHr*r(r�r�osH���
�F��x����3��	��	�	�	�=��
7�8^�
��
r*r�c��eZdZdZd�Zy)�PotentialZombieWarningTestszE
    Tests for L{twisted.internet.error.PotentialZombieWarning}.
    c��ddlm}|j|j|jg�}|j|ddt�|j|ddd�|jt|�d�y)z�
        Accessing L{PotentialZombieWarning} via the
        I{PotentialZombieWarning} attribute of L{twisted.internet.error}
        results in a deprecation warning being emitted.
        r)�error�category�messagez�twisted.internet.error.PotentialZombieWarning was deprecated in Twisted 10.0.0: There is no longer any potential for zombie process.rlN)r�r��PotentialZombieWarning�
flushWarnings�test_deprecatedro�DeprecationWarningr6)r8r��warningss   r(r�z+PotentialZombieWarningTests.test_deprecated�sx��	+�
�$�$��%�%�t�';�';�&<�=������!��Z�0�2D�E�����Q�K�	�"�
�	
�	
����X���*r*N)rDrErFrGr�rHr*r(r�r��s���+r*r�c�N�eZdZdZeej�d�d��Zy)�/ProcessIsUnimportableOnUnsupportedPlatormsTestsz�
    Tests to ensure that L{twisted.internet.process} is unimportable on
    platforms where it does not work (namely Windows).
    zOnly relevant on Windows.c��|jt�5ddl}|jjddd�y#1swYyxYw)zI
        L{twisted.internet.process} is unimportable on Windows.
        rN)r��ImportError�twisted.internet.process�internetr)r8�twisteds  r(�test_unimportableOnWindowszJProcessIsUnimportableOnUnsupportedPlatormsTests.test_unimportableOnWindows�s9��
�
�
�{�
+�	%�+����$�$�	%�	%�	%�s	�:�AN)rDrErFrGrrr�rrHr*r(rr�s3���
�"��"�"�$�$�&A�B�%�C�%r*rc��eZdZ	ejdd�ed��Zed��Z
y#e$rZee�Ze	e�Z
YdZ[�+dZ[wwxYw)�ReapingNonePidsLogsProperlyNc��tjdd�|j�\}|jt	|j
�|jd�|jt|j
�|jd�y�NzWrong error type loggedzWrong error message logged)	r�registerReapProcessHandlerr7ro�typer��
expected_typer��expected_message)r8r�s  r(�test_registerReapProcessHandlerz;ReapingNonePidsLogsProperly.test_registerReapProcessHandler�sp���*�*�4��6��(�(�*��������������%�	
�
	
���������!�!�(�	
r*c�2�tjd�}|j�|j�\}|j	t|j�|jd�|j	t|j�|jd�yr
)
r�_BaseProcess�reapProcessr7rorr�r
r�r)r8�_baseProcessr�s   r(�test__BaseProcess_reapProcessz9ReapingNonePidsLogsProperly.test__BaseProcess_reapProcess�s|���+�+�D�1��� � �"��(�(�*��������������%�	
�
	
���������!�!�(�	
r*)rDrErFr"�waitpidr1r�r�rrr
r1rrrHr*r(rr�sf�� �	��
�
�4���
�

��

��
��
��+� ��q�6���Q��
�� �s�*�A	�A�A	ri'iu'c�P�eZdZdZdd�Zdd�Zdd�Zdd�Zdd�Zdd�Z	dd	�Z
dd
�Zy)�GetFileActionsTestsz\
    Tests to make sure that the file actions computed for posix_spawn are
    correct.
    Nc�P�|jtgitt�g�y)ze
        If there are no open FDs and no requested child FDs, there's nothing to
        do.
        N�ror�CLOSE�DUP2r#s r(�test_nothingz GetFileActionsTests.test_nothing�s��
	
�����R���=�r�Br*c�`�|jtdgitt�tdfg�y)zq
        If a file descriptor is not requested but it is not close-on-exec, it
        should be closed.
        �rFrNrr#s r(�test_closeNoCloexecz'GetFileActionsTests.test_closeNoCloexec�s(��
	
����*��r�5�$�G�5�RS�*��Vr*c�R�|jtdgitt�g�y)zs
        If a file descriptor is close-on-exec and it is not requested, no
        action should be taken.
        �rTNrr#s r(�test_closeWithCloexecz)GetFileActionsTests.test_closeWithCloexec�s!��
	
����)��b�%��F��Kr*c�f�|jtdgdditt�tddfg�y)zr
        If a file descriptor is close-on-exec and it is moved, then there should be a dup2 but no close.
        r!rxrNrr#s r(�test_moveWithCloexecz(GetFileActionsTests.test_moveWithCloexec�s0��	
����Y�K�!�Q����=��q�!��~�	
r*c�t�|jtdgdditt�tddftdfg�y)z�
        If a file descriptor is not close-on-exec and it is moved, then there
        should be a dup2 followed by a close.
        rrxrNrr#s r(�test_moveNoCloexecz&GetFileActionsTests.test_moveNoCloexecs8��
	
����Z�L�1�a�&�%��>��A�q�\�E�1�:�&�	
r*c�V�|jtdgdditt�g�y)z�
        If a file descriptor is not close-on-exec and it's left in the same
        place, then there should be no actions taken.
        rrNrr#s r(�test_stayPutz GetFileActionsTests.test_stayPuts%��
	
����*���1�v�u�d�K�R�Pr*c��|jtdgdditt�tddftddftdfg�y)a
        If a file descriptor is close-on-exec and it's left in the same place,
        then we need to DUP2 it elsewhere, close the original, then DUP2 it
        back so it doesn't get closed by the implicit exec at the end of
        posix_spawn's file actions.
        r!rrlNrr#s r(�test_cloexecStayPutz'GetFileActionsTests.test_cloexecStayPuts@��	
����Y�K�!�Q����=��A�q�\�D�!�Q�<�%���4�	
r*c��|jtddgddd�tt�tddftddftddftdfg�y)z�
        If our file descriptor mapping requests that file descriptors change
        places, we must DUP2 them to a new location before DUP2ing them back.
        r)rlFrlr)rrlr�Nrr#s r(�test_inheritableConflictz,GetFileActionsTests.test_inheritableConflicts^��
	
�����Z�(������
��q�!���q�!���q�!����
�
�	
r*)rN)rDrErFrGrrr"r$r&r(r*r,rHr*r(rr�s3���
C�W�L�
�
�Q�

�
r*r)JrGr�r"r�r�r�r��unittestrr�r�r�twisted.internet.deferrrr�twisted.internet.errorrr	�twisted.internet.interfacesr
r�twisted.internet.protocolr�#twisted.internet.test.reactormixinsr
�twisted.python.compatr�twisted.python.filepathrr�twisted.python.logrr�twisted.python.runtimer�twisted.test.test_processr�twisted.trial.unittestrr�
executable�_asBytesPathrYr=r>�dictr�r��pathseprpr�r�_process�getuidrrr�intr)r1r3rJr@�globals�update�makeTestCaseClassesr�r�rrrrrrHr*r(�<module>rCs����
�	�
��
����"�E�E�A�J�5�>�/�@�'�+�1�@�	���� �-�-�/�����������	��*�*�/�/�#�(�(�3�	�,��9�4��r�y�y�{�a����B���G�8� �c� �"
�)��)�(QH�n�QH�hj
�1�j
�Z�	���$�8�8�:�;�
�4�
�$�	���'�;�;�=�>�+�(�+�4%�h�%�"(
�(�(
�V	
����
�V
�-�V
�
�V
��_%�;��G��K�:��;�s�F3�3G�G

Zerion Mini Shell 1.0