§
    Ètºf¸8  ã                   óì  — d Z ddlZddlmZ ddlmZ ddlmZ ddlm	Z	m
Z
mZmZmZmZmZmZmZ ddlmZmZmZ ddlZddlmZ dd	lmZmZmZmZmZm Z 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dl%m+Z+  G d„ dej,        j-        j.        ¦  «        Z/ ed¬¦  «         G d„ de+¦  «        ¦   «         Z0 G d„ de)¦  «        Z1 G d„ d¦  «        Z2 G d„ d¦  «        Z3 G d„ d¦  «        Z4 G d„ d ¦  «        Z5dS )!z2
Tests for L{twisted.application.runner._runner}.
é    N)ÚStringIO)ÚSIGTERM)ÚTracebackType)	ÚAnyÚIterableÚListÚOptionalÚTextIOÚTupleÚTypeÚUnionÚcast)ÚFactoryÚattribÚattrs)ÚMemoryReactor)ÚFileLogObserverÚFilteringLogObserverÚILogObserverÚLogBeginnerÚLogLevelÚLogLevelFilterPredicateÚLogPublisher)ÚFilePathé   )Ú_runneré   )Ú
ExitStatus)ÚNonePIDFileÚPIDFile)ÚRunnerc                   óÖ   — e Zd ZdZddee         dee         fd„Zdd„Z	dd„Z
dd„Zdd	„Zdd
„Zdd„Zdd„Zdd„Zdd„Zdd„Zdd„Zdd„Zdd„Zdd„Zdd„Zddedee         ddfd„ZdS )ÚRunnerTestsz
    Tests for L{Runner}.
    NÚcontentÚreturnc                 óv   — t          |                      ¦   «         ¦  «        }|�|                     |¦  «         |S ©N)r   ÚmktempÚ
setContent)Úselfr$   ÚfilePaths      új/var/www/surfInsights/venv3-11/lib/python3.11/site-packages/twisted/application/runner/test/test_runner.pyr+   zRunnerTests.filePath'   s6   € Ý˜DŸKšK™MœMÑ*Ô*ˆØÐØ×Ò Ñ(Ô(Ð(Øˆó    c                 óà  — t          ¦   «         | _        t          ¦   «         | _        |                      t
          d| j        ¦  «         |                      t
          d| j        ¦  «         d| _        | j        › d�                     ¦   «         | _        t          ¦   «         | _
        t          ¦   «         | _        t          | j
        | j        ¦  «        | _        t          ¦   «         | _        t!          ¦   «         | _        t%          | j        | j        j        | j        | j        ¦  «        | _        |                      t
          d| j        ¦  «         |                      t
          d| j        ¦  «         d S )NÚexitÚkilli9  ú
ÚstderrÚglobalLogBeginner)Ú	DummyExitr/   Ú	DummyKillr0   Úpatchr   ÚpidÚencodeÚpidFileContentr   Ústdoutr2   ÚDummyStandardIOÚstdioÚDummyWarningsModuleÚwarningsr   ÚglobalLogPublisherr   r3   ©r*   s    r,   ÚsetUpzRunnerTests.setUp-   s  € õ ‘K”KˆŒ	Ý‘K”KˆŒ	à�
Š
•7˜F D¤IÑ.Ô.Ð.Ø�
Š
•7˜F D¤IÑ.Ô.Ð.ð ˆŒØ!%¤˜o˜o˜o×4Ò4Ñ6Ô6ˆÔõ
 ‘j”jˆŒÝ‘j”jˆŒÝ$ T¤[°$´+Ñ>Ô>ˆŒ
Ý+Ñ-Ô-ˆŒå".¡.¤.ˆÔÝ!,ØÔ#ØŒJÔØŒJØŒMñ	"
ô "
ˆÔð 	�
Š
•7˜H d¤kÑ2Ô2Ð2Ø�
Š
•7Ð/°Ô1GÑHÔHÐHÐHÐHr-   c                 ó    — t          t          ¦   «         ¬¦  «        }|                     ¦   «          |                      |j        g d¢¦  «         dS )zD
        L{Runner.run} calls the expected methods in order.
        ©Úreactor)ÚkillIfRequestedÚstartLoggingÚstartReactorÚreactorExitedN)ÚDummyRunnerr   ÚrunÚassertEqualÚcalledMethods©r*   Úrunners     r,   Útest_runInOrderzRunnerTests.test_runInOrderO   s\   € õ ¥]¡_¤_Ð5Ñ5Ô5ˆØ�
Š
‰Œˆà×ÒØÔ ðð ð ñ	
ô 	
ð 	
ð 	
ð 	
r-   c                 óT  — t          ¦   «         }t          t          ¦   «         |¬¦  «        }|                      |j        ¦  «         |                      |j        ¦  «         |                     ¦   «          |                      |j        ¦  «         |                      |j        ¦  «         dS )z;
        L{Runner.run} uses the provided PID file.
        ©rD   ÚpidFileN)ÚDummyPIDFiler!   r   ÚassertFalseÚenteredÚexitedrJ   Ú
assertTrue©r*   rR   rN   s      r,   Útest_runUsesPIDFilezRunnerTests.test_runUsesPIDFile`   sŠ   € õ ‘.”.ˆå¥¡¤¸ÐAÑAÔAˆà×Ò˜œÑ)Ô)Ð)Ø×Ò˜œÑ(Ô(Ð(à�
Š
‰Œˆà�Š˜œÑ(Ô(Ð(Ø�Š˜œÑ'Ô'Ð'Ð'Ð'r-   c                 óZ  — t          |                      | j        ¦  «        ¦  «        }d„ |_        t	          t          ¦   «         |¬¦  «        }|                     ¦   «          |                      | j        j	        t          j        ¦  «         |                      | j        j        d¦  «         dS )z²
        L{Runner.run} exits with L{ExitStatus.EX_USAGE} and the expected
        message if a process is already running that corresponds to the given
        PID file.
        c                  ó   — dS ©NT© r]   r-   r,   ú<lambda>z4RunnerTests.test_runAlreadyRunning.<locals>.<lambda>w   s   €  D€ r-   rQ   zAlready running.N)r    r+   r9   Ú	isRunningr!   r   rJ   rK   r/   Ústatusr   Ú	EX_CONFIGÚmessagerX   s      r,   Útest_runAlreadyRunningz"RunnerTests.test_runAlreadyRunningp   s�   € õ ˜$Ÿ-š-¨Ô(;Ñ<Ô<Ñ=Ô=ˆØ(˜LˆÔå¥¡¤¸ÐAÑAÔAˆØ�
Š
‰Œˆà×Ò˜œÔ)­:Ô+?Ñ@Ô@Ð@Ø×Ò˜œÔ*Ð,>Ñ?Ô?Ð?Ð?Ð?r-   c                 óä   — t          t          ¦   «         ¬¦  «        }|                     ¦   «          |                      | j        j        g ¦  «         |                      | j        j        ¦  «         dS )z‚
        L{Runner.killIfRequested} when C{kill} is false doesn't exit and
        doesn't indiscriminately murder anyone.
        rC   N)	r!   r   rE   rK   r0   ÚcallsrT   r/   rV   rM   s     r,   Útest_killNotRequestedz!RunnerTests.test_killNotRequested   sc   € õ
 ¥¡¤Ð0Ñ0Ô0ˆØ×ÒÑ Ô Ð à×Ò˜œœ¨"Ñ-Ô-Ð-Ø×Ò˜œÔ)Ñ*Ô*Ð*Ð*Ð*r-   c                 ó<  — t          t          ¦   «         d¬¦  «        }|                     ¦   «          |                      | j        j        g ¦  «         |                      | j        j        t          j	        ¦  «         |                      | j        j
        d¦  «         dS )zÞ
        L{Runner.killIfRequested} when C{kill} is true but C{pidFile} is
        L{nonePIDFile} exits with L{ExitStatus.EX_USAGE} and the expected
        message; and also doesn't indiscriminately murder anyone.
        T)rD   r0   zNo PID file specified.N)r!   r   rE   rK   r0   re   r/   r`   r   ÚEX_USAGErb   rM   s     r,   Ú test_killRequestedWithoutPIDFilez,RunnerTests.test_killRequestedWithoutPIDFileŠ   s†   € õ ¥¡¤°dÐ;Ñ;Ô;ˆØ×ÒÑ Ô Ð à×Ò˜œœ¨"Ñ-Ô-Ð-Ø×Ò˜œÔ)­:Ô+>Ñ?Ô?Ð?Ø×Ò˜œÔ*Ð,DÑEÔEÐEÐEÐEr-   c                 ó¦  — t          |                      | j        ¦  «        ¦  «        }t          t	          ¦   «         d|¬¦  «        }|                     ¦   «          |                      | j        j        | j	        t          fg¦  «         |                      | j        j        t          j        ¦  «         |                      | j        j        d¦  «         dS )z—
        L{Runner.killIfRequested} when C{kill} is true and given a C{pidFile}
        performs a targeted killing of the appropriate process.
        T©rD   r0   rR   N)r    r+   r9   r!   r   rE   rK   r0   re   r7   r   r/   r`   r   ÚEX_OKÚassertIdenticalrb   rX   s      r,   Útest_killRequestedWithPIDFilez)RunnerTests.test_killRequestedWithPIDFile—   s­   € õ
 ˜$Ÿ-š-¨Ô(;Ñ<Ô<Ñ=Ô=ˆÝ¥¡¤°dÀGÐLÑLÔLˆØ×ÒÑ Ô Ð à×Ò˜œœ¨D¬HµgÐ+>Ð*?Ñ@Ô@Ð@Ø×Ò˜œÔ)­:Ô+;Ñ<Ô<Ð<Ø×Ò˜TœYÔ.°Ñ5Ô5Ð5Ð5Ð5r-   c                 óf  — t          |                      d¦  «        ¦  «        }dt          fd„}||_        t	          t          ¦   «         d|¬¦  «        }|                     ¦   «          |                      | j        j	        t          j        ¦  «         |                      | j        j        d¦  «         dS )z•
        L{Runner.killIfRequested} when C{kill} is true and given a C{pidFile}
        that it can't read exits with L{ExitStatus.EX_IOERR}.
        Nr%   c                  ó6   — t          t          j        d¦  «        ‚)NzPermission denied)ÚOSErrorÚerrnoÚEACCESr]   r-   r,   Úreadz?RunnerTests.test_killRequestedWithPIDFileCantRead.<locals>.read«   s   € Ý�%œ,Ð(;Ñ<Ô<Ð<r-   Trk   zUnable to read PID file.)r    r+   Úintrt   r!   r   rE   rK   r/   r`   r   ÚEX_IOERRrb   )r*   rR   rt   rN   s       r,   Ú%test_killRequestedWithPIDFileCantReadz1RunnerTests.test_killRequestedWithPIDFileCantRead¤   s«   € õ
 ˜$Ÿ-š-¨Ñ-Ô-Ñ.Ô.ˆð	=•cð 	=ð 	=ð 	=ð 	=ð ˆŒå¥¡¤°dÀGÐLÑLÔLˆØ×ÒÑ Ô Ð à×Ò˜œÔ)­:Ô+>Ñ?Ô?Ð?Ø×Ò˜œÔ*Ð,FÑGÔGÐGÐGÐGr-   c                 óB  — t          |                      d¦  «        ¦  «        }t          t          ¦   «         d|¬¦  «        }|                     ¦   «          |                      | j        j        t          j	        ¦  «         |                      | j        j
        d¦  «         dS )z˜
        L{Runner.killIfRequested} when C{kill} is true and given a C{pidFile}
        containing no value exits with L{ExitStatus.EX_DATAERR}.
        r-   Trk   úInvalid PID file.N©r    r+   r!   r   rE   rK   r/   r`   r   Ú
EX_DATAERRrb   rX   s      r,   Ú"test_killRequestedWithPIDFileEmptyz.RunnerTests.test_killRequestedWithPIDFileEmpty¶   s‡   € õ
 ˜$Ÿ-š-¨Ñ,Ô,Ñ-Ô-ˆÝ¥¡¤°dÀGÐLÑLÔLˆØ×ÒÑ Ô Ð à×Ò˜œÔ)­:Ô+@ÑAÔAÐAØ×Ò˜œÔ*Ð,?Ñ@Ô@Ð@Ð@Ð@r-   c                 óB  — t          |                      d¦  «        ¦  «        }t          t          ¦   «         d|¬¦  «        }|                     ¦   «          |                      | j        j        t          j	        ¦  «         |                      | j        j
        d¦  «         dS )z£
        L{Runner.killIfRequested} when C{kill} is true and given a C{pidFile}
        containing a non-integer value exits with L{ExitStatus.EX_DATAERR}.
        s    ** totally not a number, dude **Trk   ry   Nrz   rX   s      r,   Ú%test_killRequestedWithPIDFileNotAnIntz1RunnerTests.test_killRequestedWithPIDFileNotAnIntÂ   sˆ   € õ
 ˜$Ÿ-š-Ð(KÑLÔLÑMÔMˆÝ¥¡¤°dÀGÐLÑLÔLˆØ×ÒÑ Ô Ð à×Ò˜œÔ)­:Ô+@ÑAÔAÐAØ×Ò˜œÔ*Ð,?Ñ@Ô@Ð@Ð@Ð@r-   c                 ó¸  ‡‡‡— t          ¦   «         } G ˆfd„d¦  «        Š|                      t          d ‰¦   «         ¦  «          G ˆfd„dt          ¦  «        Š|                      t          d‰¦  «          G ˆfd„dt          ¦  «        Št          t          ¦   «         t          j        |‰¬	¦  «        }| 	                    ¦   «          |  
                    t          ‰j        ¦  «        d
¦  «         |                      ‰j        d         t          ¦  «         |  
                    t          ‰j        ¦  «        d
¦  «         |                      ‰j        d         t          ¦  «         |                      ‰j        d         j        t          j        ¦  «         t%          ‰‰j        ¦  «        }|                      |‰¦  «         |                      |j        |¦  «         dS )zÛ
        L{Runner.startLogging} sets up a filtering observer with a log level
        predicate set to the given log level that contains a file observer of
        the given type which writes to the given file.
        c                   óL   •— e Zd ZU g Zee         ed<   dee         ddfˆ fd„ZdS )ú2RunnerTests.test_startLogging.<locals>.LogBeginnerÚ	observersr%   Nc                 ó0   •— t          |¦  «        ‰_        d S r'   )Úlistr‚   )r*   r‚   r   s     €r,   ÚbeginLoggingTozARunnerTests.test_startLogging.<locals>.LogBeginner.beginLoggingToÜ   s   ø€ Ý(,¨Y©¬�Ô%Ð%Ð%r-   )	Ú__name__Ú
__module__Ú__qualname__r‚   r   r   Ú__annotations__r   r…   )r   s   €r,   r   r�   Ù   s]   ø€ € € € € € Ø,.ˆI�t˜LÔ)Ð.Ð.Ñ.ð8°¸Ô0Fð 8È4ð 8ð 8ð 8ð 8ð 8ð 8ð 8ð 8r-   r   r3   c            	       óˆ   •— e Zd ZU dZee         ed<   g Zee	         ed<    e
ed„ ¦  «        fdedee	         deddfˆ fd„ZdS )ú?RunnerTests.test_startLogging.<locals>.MockFilteringLogObserverNÚobserverÚ
predicatesc                 ó   — d S r'   r]   )Úevents    r,   r^   zHRunnerTests.test_startLogging.<locals>.MockFilteringLogObserver.<lambda>ë   s   € ÐRV€ r-   ÚnegativeObserverr%   c                 ól   •— |‰_         t          |¦  «        ‰_        t          j        | |||¦  «         d S r'   )rŒ   r„   r�   r   Ú__init__)r*   rŒ   r�   r�   ÚMockFilteringLogObservers       €r,   r’   zHRunnerTests.test_startLogging.<locals>.MockFilteringLogObserver.__init__ç   sH   ø€ ð 5=Ð(Ô1Ý6:¸:Ñ6FÔ6FÐ(Ô3Ý$Ô-Ø˜( JÐ0@ñô ð ð ð r-   )r†   r‡   rˆ   rŒ   r	   r   r‰   r�   r   r   r   r   r’   )r“   s   €r,   r“   r‹   ã   s¦   ø€ € € € € € Ø/3ˆH�h˜|Ô,Ð3Ð3Ñ3Ø8:ˆJ˜Ð4Ô5Ð:Ð:Ñ:ð 26°°lÐDVÐDVÑ1WÔ1Wð	
ð 
à&ð
ð %Ð%<Ô=ð
ð #/ð	
ð
 ð
ð 
ð 
ð 
ð 
ð 
ð 
ð 
r-   r“   r   c                   ó@   •— e Zd ZU dZee         ed<   deddfˆ fd„ZdS )ú:RunnerTests.test_startLogging.<locals>.MockFileLogObserverNÚoutFiler%   c                 óL   •— |‰_         t          j        | |t          ¦  «         d S r'   )r–   r   r’   Ústr)r*   r–   ÚMockFileLogObservers     €r,   r’   zCRunnerTests.test_startLogging.<locals>.MockFileLogObserver.__init__ú   s'   ø€ Ø.5Ð#Ô+ÝÔ(¨¨w½Ñ<Ô<Ð<Ð<Ð<r-   )r†   r‡   rˆ   r–   r	   r
   r‰   r’   )r™   s   €r,   r™   r•   ÷   sX   ø€ € € € € € Ø(,ˆG�X˜fÔ%Ð,Ð,Ñ,ð=¨ð =°4ð =ð =ð =ð =ð =ð =ð =ð =r-   r™   )rD   ÚdefaultLogLevelÚlogFileÚfileLogObserverFactoryé   r   N)r   r6   r   r   r   r!   r   r   ÚcriticalrF   rK   Úlenr‚   ÚassertIsInstancer�   r   rm   rš   r   rŒ   r–   )r*   r›   rN   rŒ   r   r™   r“   s       @@@r,   Útest_startLoggingzRunnerTests.test_startLoggingÎ   s(  øøø€ õ ‘*”*ˆð
	8ð 	8ð 	8ð 	8ð 	8ð 	8ð 	8ñ 	8ô 	8ð 	8ð 	�
Š
•7Ð/°°±´Ñ?Ô?Ð?ð	ð 	ð 	ð 	ð 	ð 	ð 	Õ';ñ 	ô 	ð 	ð  	�
Š
•7Ð2Ð4LÑMÔMÐMð	=ð 	=ð 	=ð 	=ð 	=ð 	=ð 	=¥/ñ 	=ô 	=ð 	=õ Ý!‘O”OÝ$Ô-ØØ#6ð	
ñ 
ô 
ˆð 	×ÒÑÔÐð 	×Ò�˜[Ô2Ñ3Ô3°QÑ7Ô7Ð7Ø×Ò˜kÔ3°AÔ6Õ8LÑMÔMÐMð 	×Ò�Ð5Ô@ÑAÔAÀ1ÑEÔEÐEØ×ÒØ$Ô/°Ô2Õ4Kñ	
ô 	
ð 	
ð 	×ÒØ$Ô/°Ô2ÔBÅHÔDUñ	
ô 	
ð 	
õ
 Ð+Ð-EÔ-NÑOÔOˆØ×Ò˜hÐ(;Ñ<Ô<Ð<ð 	×Ò˜XÔ-¨wÑ7Ô7Ð7Ð7Ð7r-   c                 óž   — t          ¦   «         }t          |¬¦  «        }|                     ¦   «          |                      |j        ¦  «         dS )ze
        L{Runner.startReactor} with the C{reactor} argument runs the given
        reactor.
        rC   N)r   r!   rG   rW   ÚhasRun)r*   rD   rN   s      r,   Útest_startReactorWithReactorz(RunnerTests.test_startReactorWithReactor  sI   € õ
  ‘/”/ˆÝ Ð(Ñ(Ô(ˆØ×ÒÑÔÐà�Š˜œÑ'Ô'Ð'Ð'Ð'r-   c                 ó2   — |                       dd¦  «         dS )z�
        L{Runner.startReactor} ensures that C{whenRunning} is called with
        C{whenRunningArguments} when the reactor is running.
        ÚwhenRunningrG   N©Ú	_testHookr@   s    r,   Útest_startReactorWhenRunningz(RunnerTests.test_startReactorWhenRunning&  s   € ð
 	�Š�} nÑ5Ô5Ð5Ð5Ð5r-   c                 ó0   — |                       d¦  «         dS )zb
        L{Runner.whenRunning} calls C{whenRunning} with
        C{whenRunningArguments}.
        r¦   Nr§   r@   s    r,   Útest_whenRunningWithArgumentsz)RunnerTests.test_whenRunningWithArguments-  s   € ð
 	�Š�}Ñ%Ô%Ð%Ð%Ð%r-   c                 ó0   — |                       d¦  «         dS )zf
        L{Runner.whenRunning} calls C{reactorExited} with
        C{reactorExitedArguments}.
        rH   Nr§   r@   s    r,   Útest_reactorExitedWithArgumentsz+RunnerTests.test_reactorExitedWithArguments4  s   € ð
 	�Š�Ñ'Ô'Ð'Ð'Ð'r-   Ú
methodNameÚ
callerNamec                 óº  ‡— |€|}t          t          ¦   «         t          ¦   «         t          ¦   «         ¬¦  «        }g Šdt          ddfˆfd„}|||› d�|                     ¦   «         i}t          d
dt	          ¦   «         i|¤Ž}t          ||¦  «        } |¦   «          |                      t          ‰¦  «        d¦  «         |                      ‰d	         |¦  «         dS )aÊ  
        Verify that the named hook is run with the expected arguments as
        specified by the arguments used to create the L{Runner}, when the
        specified caller is invoked.

        @param methodName: The name of the hook to verify.

        @param callerName: The name of the method that is expected to cause the
            hook to be called.
            If C{None}, use the L{Runner} method with the same name as the
            hook.
        N)ÚaÚbÚcÚ	argumentsr%   c                  ó2   •— ‰                      | ¦  «         d S r'   )Úappend)r´   ÚargumentsSeens    €r,   Úhookz#RunnerTests._testHook.<locals>.hookN  s   ø€ Ø× Ò  Ñ+Ô+Ð+Ð+Ð+r-   Ú	ArgumentsrD   r�   r   r]   )ÚdictÚobjectÚcopyr!   r   ÚgetattrrK   rŸ   )	r*   r®   r¯   r´   r¸   ÚrunnerArgumentsrN   Ú
hookCallerr·   s	           @r,   r¨   zRunnerTests._testHook;  s  ø€ ð ÐØ#ˆJå�6™8œ8¥v¡x¤xµ6±8´8Ð<Ñ<Ô<ˆ	Øˆð	,�fð 	,¨ð 	,ð 	,ð 	,ð 	,ð 	,ð 	,ð ˜ØÐ$Ð$Ð$ i§n¢nÑ&6Ô&6ð
ˆõ ð 
ð 
Ý!‘O”Oð
Ø'6ð
ð 
ˆõ ˜V ZÑ0Ô0ˆ
Øˆ
‰Œˆà×Ò�˜]Ñ+Ô+¨QÑ/Ô/Ð/Ø×Ò˜ qÔ)¨9Ñ5Ô5Ð5Ð5Ð5r-   r'   ©r%   N)r†   r‡   rˆ   Ú__doc__r	   Úbytesr   r˜   r+   rA   rO   rY   rc   rf   ri   rn   rw   r|   r~   r¡   r¤   r©   r«   r­   r¨   r]   r-   r,   r#   r#   "   sÉ  € € € € € ðð ðð  ¨¤ð ¸8ÀC¼=ð ð ð ð ð Ið  Ið  Ið  IðD
ð 
ð 
ð 
ð"(ð (ð (ð (ð @ð @ð @ð @ð	+ð 	+ð 	+ð 	+ðFð Fð Fð Fð6ð 6ð 6ð 6ðHð Hð Hð Hð$
Að 
Að 
Að 
Að
Að 
Að 
Að 
AðK8ð K8ð K8ð K8ðZ	(ð 	(ð 	(ð 	(ð6ð 6ð 6ð 6ð&ð &ð &ð &ð(ð (ð (ð (ð"6ð "6 Cð "6°X¸c´]ð "6Èdð "6ð "6ð "6ð "6ð "6ð "6r-   r#   T)Úfrozenc                   ój   — e Zd ZdZ eee          ee¦  «        ¬¦  «        Z	d	d„Z
d	d„Zd	d„Zd	d„ZdS )
rI   zg
    Stub for L{Runner}.

    Keep track of calls to some methods without actually doing anything.
    )ÚtypeÚdefaultr%   Nc                 ó:   — | j                              d¦  «         d S )NrE   ©rL   r¶   r@   s    r,   rE   zDummyRunner.killIfRequestedj  s    € ØÔ×!Ò!Ð"3Ñ4Ô4Ð4Ð4Ð4r-   c                 ó:   — | j                              d¦  «         d S )NrF   rÈ   r@   s    r,   rF   zDummyRunner.startLoggingm  ó   € ØÔ×!Ò! .Ñ1Ô1Ð1Ð1Ð1r-   c                 ó:   — | j                              d¦  «         d S )NrG   rÈ   r@   s    r,   rG   zDummyRunner.startReactorp  rÊ   r-   c                 ó:   — | j                              d¦  «         d S )NrH   rÈ   r@   s    r,   rH   zDummyRunner.reactorExiteds  s   € ØÔ×!Ò! /Ñ2Ô2Ð2Ð2Ð2r-   rÀ   )r†   r‡   rˆ   rÁ   r   r   r˜   r   r„   rL   rE   rF   rG   rH   r]   r-   r,   rI   rI   `  s�   € € € € € ðð ð �F  S¤	°7°7¸4±=´=ÐAÑAÔA€Mð5ð 5ð 5ð 5ð2ð 2ð 2ð 2ð2ð 2ð 2ð 2ð3ð 3ð 3ð 3ð 3ð 3r-   rI   c                   ój   — e Zd ZdZd
d„Zdd„Zdeee                  dee         dee	         ddfd	„Z
dS )rS   z]
    Stub for L{PIDFile}.

    Tracks context manager entry/exit without doing anything.
    r%   Nc                 óJ   — t          j        | ¦  «         d| _        d| _        d S ©NF)r   r’   rU   rV   r@   s    r,   r’   zDummyPIDFile.__init__~  s%   € ÝÔ˜TÑ"Ô"Ð"àˆŒØˆŒˆˆr-   c                 ó   — d| _         | S r\   )rU   r@   s    r,   Ú	__enter__zDummyPIDFile.__enter__„  s   € ØˆŒØˆr-   ÚexcTypeÚexcValueÚ	tracebackc                 ó   — d| _         d S r\   ©rV   )r*   rÒ   rÓ   rÔ   s       r,   Ú__exit__zDummyPIDFile.__exit__ˆ  s   € ð ˆŒˆˆr-   rÀ   )r%   rS   )r†   r‡   rˆ   rÁ   r’   rÑ   r	   r   ÚBaseExceptionr   r×   r]   r-   r,   rS   rS   w  s”   € € € € € ðð ðð ð ð ðð ð ð ðà˜$˜}Ô-Ô.ðð ˜=Ô)ðð ˜MÔ*ð	ð
 
ðð ð ð ð ð r-   rS   c                   óN   — e Zd ZdZdd„Z	 d	deeef         dee	         ddfd„Z
dS )
r4   zy
    Stub for L{_exit.exit} that remembers whether it's been called and, if it has,
    what arguments it was given.
    r%   Nc                 ó   — d| _         d S rÏ   rÖ   r@   s    r,   r’   zDummyExit.__init__—  s   € ØˆŒˆˆr-   r`   rb   c                 óB   — | j         rJ ‚|| _        || _        d| _         d S r\   )rV   r`   rb   )r*   r`   rb   s      r,   Ú__call__zDummyExit.__call__š  s+   € ð ”;ÐÐÐàˆŒØˆŒØˆŒˆˆr-   rÀ   r'   )r†   r‡   rˆ   rÁ   r’   r   ru   r   r	   r˜   rÜ   r]   r-   r,   r4   r4   ‘  sw   € € € € € ðð ð
ð ð ð ð HLðð Ø˜C ˜OÔ,ðØ7?À´}ðà	ðð ð ð ð ð r-   r4   c                   ó.   — e Zd ZdZdd„Zdededdfd„ZdS )	r5   zv
    Stub for L{os.kill} that remembers whether it's been called and, if it has,
    what arguments it was given.
    r%   Nc                 ó   — g | _         d S r'   )re   r@   s    r,   r’   zDummyKill.__init__ª  s   € Ø,.ˆŒ
ˆ
ˆ
r-   r7   Úsigc                 ó>   — | j                              ||f¦  «         d S r'   )re   r¶   )r*   r7   rß   s      r,   rÜ   zDummyKill.__call__­  s"   € ØŒ
×Ò˜3 ˜*Ñ%Ô%Ð%Ð%Ð%r-   rÀ   )r†   r‡   rˆ   rÁ   r’   ru   rÜ   r]   r-   r,   r5   r5   ¤  s[   € € € € € ðð ð
/ð /ð /ð /ð&˜Cð & cð &¨dð &ð &ð &ð &ð &ð &r-   r5   c                   ó&   — e Zd ZdZdededdfd„ZdS )r;   zR
    Stub for L{sys} which provides L{StringIO} streams as stdout and stderr.
    r:   r2   r%   Nc                 ó"   — || _         || _        d S r'   )r:   r2   )r*   r:   r2   s      r,   r’   zDummyStandardIO.__init__¶  s   € ØˆŒØˆŒˆˆr-   )r†   r‡   rˆ   rÁ   r
   r’   r]   r-   r,   r;   r;   ±  sG   € € € € € ðð ð˜vð ¨vð ¸$ð ð ð ð ð ð r-   r;   c                   ó&   — e Zd ZdZdededdfd„ZdS )r=   zV
    Stub for L{warnings} which provides a C{showwarning} method that is a no-op.
    ÚargsÚkwargsr%   Nc                  ó   — dS )z\
        Do nothing.

        @param args: ignored.
        @param kwargs: ignored.
        Nr]   )rä   rå   s     r,   ÚshowwarningzDummyWarningsModule.showwarningÀ  s   € € € r-   )r†   r‡   rˆ   rÁ   r   rç   r]   r-   r,   r=   r=   »  sG   € € € € € ðð ð˜3ð ¨#ð °$ð ð ð ð ð ð r-   r=   )6rÁ   rr   Úior   Úsignalr   Útypesr   Útypingr   r   r   r	   r
   r   r   r   r   Úattrr   r   r   Útwisted.trial.unittestÚtwistedÚtwisted.internet.testingr   Útwisted.loggerr   r   r   r   r   r   r   Útwisted.python.filepathr   rN   r   Ú_exitr   Ú_pidfiler   r    r!   ÚtrialÚunittestÚTestCaser#   rI   rS   r4   r5   r;   r=   r]   r-   r,   ú<module>r÷      sÝ  ððð ð €€€Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø RÐ RÐ RÐ RÐ RÐ RÐ RÐ RÐ RÐ RÐ RÐ RÐ RÐ RÐ RÐ RÐ RÐ RÐ RÐ RÐ RÐ Rà 'Ð 'Ð 'Ð 'Ð 'Ð 'Ð 'Ð 'Ð 'Ð 'à Ð Ð Ð Ø 2Ð 2Ð 2Ð 2Ð 2Ð 2ðð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð -Ð ,Ð ,Ð ,Ð ,Ð ,Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø +Ð +Ð +Ð +Ð +Ð +Ð +Ð +Ø Ð Ð Ð Ð Ð ð{6ð {6ð {6ð {6ð {6�'”-Ô(Ô1ñ {6ô {6ð {6ð|	 €ˆdÐÑÔð3ð 3ð 3ð 3ð 3�&ñ 3ô 3ñ Ôð3ð,ð ð ð ð �;ñ ô ð ð4ð ð ð ð ñ ô ð ð&
&ð 
&ð 
&ð 
&ð 
&ñ 
&ô 
&ð 
&ðð ð ð ð ñ ô ð ðð ð ð ð ñ ô ð ð ð r-   