+
    Dfj                         R t ^ RIHt ^ RIHtHt ^ RIt^RIH	t	 ^RI	H
t
Ht  ! R R]P                  P                  P                  4      t ! R R	4      tR# )
z0
Tests for L{twisted.application.runner._exit}.
)StringIO)OptionalUnionN)_exit)
ExitStatusexitc                   ~   a  ] tR t^t o RtV 3R lR ltV 3R lR ltV 3R lR ltV 3R lR	 ltV 3R
 lR lt	Rt
V tR# )	ExitTestsz
Tests for L{exit}.
c                   < V ^8  d   QhRR/#    returnN )format__classdict__s   "K/usr/lib/python3/dist-packages/twisted/application/runner/test/test_exit.py__annotate__ExitTests.__annotate__   s     0 0t 0    c                f    \        4       V n        V P                  \        R V P                  4       R# )sysexitN)	DummyExitr   patchr   selfs   &r   setUpExitTests.setUp   s    K	

5)TYY/r   c                   < V ^8  d   QhRR/# r   r   )r   r   s   "r   r   r      s     0 0D 0r   c                l    Rp\        V4       V P                  V P                   P                  V4       R# )zB
L{exit} given an L{int} status code will pass it to L{sys.exit}.
i  N)r   assertEqualargr   statuss   & r   test_exitStatusIntExitTests.test_exitStatusInt   s(     V/r   c                   < V ^8  d   QhRR/# r   r   )r   r   s   "r   r   r   !   s     6 64 6r   c                    \         P                  p\        V4       V P                  V P                  P                  VP
                  4       R# )z]
L{exit} given a L{ValueConstant} status code passes the corresponding
value to L{sys.exit}.
N)r   	EX_CONFIGr   r   r    valuer!   s   & r   test_exitConstantExitTests.test_exitConstant!   s2    
 %%V5r   c                   < V ^8  d   QhRR/# r   r   )r   r   s   "r   r   r   *   s     9 9d 9r   c                    \        4       pV P                  \        RV4       Rp\        ^ V4       V P	                  VP                  4       VR,           4       R# )zY
L{exit} given a status code of zero (C{0}) writes the given message to
standard output.
stdoutHello, world.
Nr   r   r   r   r   getvaluer   outmessages   &  r   test_exitMessageZeroExitTests.test_exitMessageZero*   sD    
 j

5(C(!Q48r   c                   < V ^8  d   QhRR/# r   r   )r   r   s   "r   r   r   7   s     9 9 9r   c                    \        4       pV P                  \        RV4       Rp\        ^@V4       V P	                  VP                  4       VR,           4       R# )zR
L{exit} given a non-zero status code writes the given message to
standard error.
stderrr.   r/   Nr0   r2   s   &  r   test_exitMessageNonZero!ExitTests.test_exitMessageNonZero7   sD    
 j

5(C(!R48r   )r   N)__name__
__module____qualname____firstlineno____doc__r   r#   r)   r5   r:   __static_attributes____classdictcell__r   s   @r   r	   r	      s<     0 00 06 69 99 9r   r	   c                   L   a  ] tR t^Et o RtV 3R lR ltRV 3R lR lltRtV tR# )	r   zj
Stub for L{sys.exit} that remembers whether it's been called and, if it
has, what argument it was given.
c                   < V ^8  d   QhRR/# r   r   )r   r   s   "r   r   DummyExit.__annotate__K   s      $ r   c                    R V n         R# )FN)exitedr   s   &r   __init__DummyExit.__init__K   s	    r   Nc                J   < V ^8  d   QhRS[ S[S[S[3,          ,          RR/# )r   r    r   N)r   r   intstr)r   r   s   "r   r   rF   N   s(      HU38_5  r   c                H    V P                   '       d   Q hWn        R V n         R# )TN)rH   r    )r   r    s   &&r   __call__DummyExit.__call__N   s    ;;;r   )r    rH   )N)	r<   r=   r>   r?   r@   rI   rO   rA   rB   rC   s   @r   r   r   E   s#     
   r   r   )r@   ior   typingr   r   twisted.trial.unittesttwistedrunnerr   r   r   trialunittestTestCaser	   r   r   r   r   <module>rY      sB     "   $29&&// 29j r   