
    tf                        d Z ddlmZmZmZmZ  G d d          Z G d dee          Z G d dee          Z G d	 d
          Z	 G d de	e          Z
 G d de	e          Z G d d          Z G d dee          Z G d dee          Z G d d          Z G d dee          Z G d dee          Z G d d          Z G d dee          Z G d d ee          Z G d! d"          Z G d# d$ee          Z G d% d&ee          Z G d' d(          Z G d) d*ee          Z G d+ d,ee          Z G d- d.          Z G d/ d0ee          Z G d1 d2ee          Z G d3 d4          Z G d5 d6ee          Z G d7 d8ee          Z  G d9 d:          Z! G d; d<e!e          Z" G d= d>e!e          Z# G d? d@e          Z$dAS )Ba$  
Definitions of test cases with various interesting behaviors, to be used by
L{twisted.trial.test.test_tests} and other test modules to exercise different
features of trial's test runner.

See the L{twisted.trial.test.test_tests} module docstring for details about how
this code is arranged.
    )FailTestSkipTestSynchronousTestCaseTestCasec                   <    e Zd Zd Zd Zde_        d Zde_        dS )SkippingMixinc                      t          d          Nskip1r   selfs    Z/var/www/surfInsights/venv3-11/lib/python3.11/site-packages/twisted/trial/test/skipping.py
test_skip1zSkippingMixin.test_skip1       w    c                      t          d          )NzI should not get raisedRuntimeErrorr   s    r   
test_skip2zSkippingMixin.test_skip2   s    4555r   skip2c                 0    |                      d           d S )NzI should not failfailr   s    r   
test_skip3zSkippingMixin.test_skip3   s    		%&&&&&r   skip3N)__name__
__module____qualname__r   r   skipr    r   r   r   r      sM             6 6 6 JO' ' ' JOOOr   r   c                       e Zd ZdS )SynchronousSkippingNr   r   r   r!   r   r   r#   r#   !           Dr   r#   c                       e Zd ZdS )AsynchronousSkippingNr$   r!   r   r   r'   r'   %   r%   r   r'   c                        e Zd Zd Zd Zd ZdS )SkippingSetUpMixinc                      t          d          )N	skipSetUpr   r   s    r   setUpzSkippingSetUpMixin.setUp*   s    {###r   c                     d S Nr!   r   s    r   test_1zSkippingSetUpMixin.test_1-       r   c                     d S r.   r!   r   s    r   test_2zSkippingSetUpMixin.test_20   r0   r   N)r   r   r   r,   r/   r2   r!   r   r   r)   r)   )   sA        $ $ $      r   r)   c                       e Zd ZdS )SynchronousSkippingSetUpNr$   r!   r   r   r4   r4   4   r%   r   r4   c                       e Zd ZdS )AsynchronousSkippingSetUpNr$   r!   r   r   r6   r6   8   r%   r   r6   c                       e Zd Zd ZdS )DeprecatedReasonlessSkipMixinc                     t                      r.   r   r   s    r   r/   z$DeprecatedReasonlessSkipMixin.test_1=   s    jjr   N)r   r   r   r/   r!   r   r   r8   r8   <   s#            r   r8   c                       e Zd ZdS )#SynchronousDeprecatedReasonlessSkipNr$   r!   r   r   r;   r;   A   s         	Dr   r;   c                       e Zd ZdS )$AsynchronousDeprecatedReasonlessSkipNr$   r!   r   r   r=   r=   G   r%   r   r=   c                   >    e Zd ZdZd Zd Zd Zde_        d Zd ZdS )	SkippedClassMixinclassc                     d| j         _        d S )NT)	__class__	_setUpRanr   s    r   r,   zSkippedClassMixin.setUpN   s    #'   r   c                      t          d          r
   r   r   s    r   r   zSkippedClassMixin.test_skip1Q   r   r   c                      t          d          )NzOught to skip mer   r   s    r   r   zSkippedClassMixin.test_skip2T       -...r   r   c                     d S r.   r!   r   s    r   r   zSkippedClassMixin.test_skip3Y   r0   r   c                      t          d          )NzSkip me toor   r   s    r   
test_skip4zSkippedClassMixin.test_skip4\   s    =)))r   N)	r   r   r   r    r,   r   r   r   rI   r!   r   r   r?   r?   K   sm        D( ( (     / / / JO  * * * * *r   r?   c                       e Zd ZdS )SynchronousSkippedClassNr$   r!   r   r   rK   rK   `   r%   r   rK   c                       e Zd ZdS )AsynchronousSkippedClassNr$   r!   r   r   rM   rM   d   r%   r   rM   c                   J    e Zd Zd Zde_        d Zde_        d Zde_        dS )	TodoMixinc                 0    |                      d           d S Nzdeliberate failurer   r   s    r   
test_todo1zTodoMixin.test_todo1i       		&'''''r   todo1c                      t          d          Nzdeliberate errorr   r   s    r   
test_todo2zTodoMixin.test_todo2n   rF   r   todo2c                     dS )zunexpected successNr!   r   s    r   
test_todo3zTodoMixin.test_todo3s   s      r   todo3N)r   r   r   rR   todorW   rZ   r!   r   r   rO   rO   h   sV        ( ( ( JO/ / / JO! ! ! JOOOr   rO   c                       e Zd ZdS )SynchronousTodoNr$   r!   r   r   r^   r^   y   r%   r   r^   c                       e Zd ZdS )AsynchronousTodoNr$   r!   r   r   r`   r`   }   r%   r   r`   c                   (    e Zd Zd Zd Zde_        dS )SetUpTodoMixinc                      t          d          rV   r   r   s    r   r,   zSetUpTodoMixin.setUp   rF   r   c                     d S r.   r!   r   s    r   rR   zSetUpTodoMixin.test_todo1   r0   r   zsetUp todo1N)r   r   r   r,   rR   r\   r!   r   r   rb   rb      s5        / / /   $JOOOr   rb   c                       e Zd ZdS )SynchronousSetUpTodoNr$   r!   r   r   rf   rf      r%   r   rf   c                       e Zd ZdS )AsynchronousSetUpTodoNr$   r!   r   r   rh   rh      r%   r   rh   c                   (    e Zd Zd Zd Zde_        dS )TearDownTodoMixinc                      t          d          rV   r   r   s    r   tearDownzTearDownTodoMixin.tearDown   rF   r   c                     d S r.   r!   r   s    r   rR   zTearDownTodoMixin.test_todo1   r0   r   ztearDown todo1N)r   r   r   rl   rR   r\   r!   r   r   rj   rj      s5        / / /   'JOOOr   rj   c                       e Zd ZdS )SynchronousTearDownTodoNr$   r!   r   r   ro   ro      r%   r   ro   c                       e Zd ZdS )AsynchronousTearDownTodoNr$   r!   r   r   rq   rq      r%   r   rq   c                   F    e Zd ZdZd Zde_        d Zd Zde_        d ZdS )TodoClassMixinr@   c                     d S r.   r!   r   s    r   rR   zTodoClassMixin.test_todo1   r0   r   methodc                     d S r.   r!   r   s    r   rW   zTodoClassMixin.test_todo2   r0   r   c                 0    |                      d           d S NzDeliberate Failurer   r   s    r   rZ   zTodoClassMixin.test_todo3   rS   r   c                 0    |                      d           d S rx   r   r   s    r   
test_todo4zTodoClassMixin.test_todo4   rS   r   N)r   r   r   r\   rR   rW   rZ   rz   r!   r   r   rs   rs      sg        D   JO  ( ( ( JO( ( ( ( (r   rs   c                       e Zd ZdS )SynchronousTodoClassNr$   r!   r   r   r|   r|      r%   r   r|   c                       e Zd ZdS )AsynchronousTodoClassNr$   r!   r   r   r~   r~      r%   r   r~   c                       e Zd Zd Zedfe_        d Zeefdfe_        d Zedfe_        d Z	ee
fdfe	_        d	 Zed
fe_        d Zedfe_        d Zedfe_        dS )StrictTodoMixinc                      t          d          Nzexpected failurer   r   s    r   rR   zStrictTodoMixin.test_todo1   rF   r   rT   c                      t          d          r   r   r   s    r   rW   zStrictTodoMixin.test_todo2   rF   r   rX   c                      t          d          Nzwe had no idea!r   r   s    r   rZ   zStrictTodoMixin.test_todo3       ,---r   r[   c                      t          d          r   r   r   s    r   rz   zStrictTodoMixin.test_todo4   r   r   todo4c                 0    |                      d           d S rQ   r   r   s    r   
test_todo5zStrictTodoMixin.test_todo5   rS   r   todo5c                 0    |                      d           d S rQ   r   r   s    r   
test_todo6zStrictTodoMixin.test_todo6   rS   r   todo6c                     d S r.   r!   r   s    r   
test_todo7zStrictTodoMixin.test_todo7   r0   r   todo7N)r   r   r   rR   r   r\   rW   OSErrorrZ   rz   SyntaxErrorr   r   r   r   r!   r   r   r   r      s        / / / $W-JO/ / / %g.8JO. . . (JO. . .  -w7JO( ( (  )JO( ( ( $W-JO   $W-JOOOr   r   c                       e Zd ZdS )SynchronousStrictTodoNr$   r!   r   r   r   r      r%   r   r   c                       e Zd ZdS )AsynchronousStrictTodoNr$   r!   r   r   r   r      r%   r   r   c                   2    e Zd Zd Zd Zd Zd Zd Zd ZdS )AddCleanupMixinc                     dg| _         d S )Nr,   )logr   s    r   r,   zAddCleanupMixin.setUp   s    9r   c                 0    dg| _         t          d          )Nr,   zDeliberate failure)r   r   r   s    r   brokenSetUpzAddCleanupMixin.brokenSetUp   s    9/000r   c                 0    dg| _         t          d          )Nr,   zDon't do this)r   r   r   s    r   skippingSetUpzAddCleanupMixin.skippingSetUp   s    9'''r   c                 :    | j                             |           d S r.   r   append)r   things     r   r   zAddCleanupMixin.append   s    r   c                 :    | j                             d           d S )Nrl   r   r   s    r   rl   zAddCleanupMixin.tearDown   s    
#####r   c                 :    | j                             d           d S )NrunTestr   r   s    r   r   zAddCleanupMixin.runTest   s    	"""""r   N)	r   r   r   r,   r   r   r   rl   r   r!   r   r   r   r      sn          1 1 1( ( (  $ $ $# # # # #r   r   c                       e Zd ZdS )SynchronousAddCleanupNr$   r!   r   r   r   r     r%   r   r   c                       e Zd ZdS )AsynchronousAddCleanupNr$   r!   r   r   r   r     r%   r   r   c                   (    e Zd ZdZddZde_        dS )ExpectedFailurezp
    Hold a test that has an expected failure with an exception that has a
    large string representation.
    returnNc                 &    t          ddz            )z'
        Fail, but expectedly.
        xi  r   r   s    r   "test_expectedFailureGreaterThan64kz2ExpectedFailure.test_expectedFailureGreaterThan64k  s     3),---r   zshort todo string)r   N)r   r   r   __doc__r   r\   r!   r   r   r   r     s:         
. . . . /B&+++r   r   N)%r   twisted.trial.unittestr   r   r   r   r   r#   r'   r)   r4   r6   r8   r;   r=   r?   rK   rM   rO   r^   r`   rb   rf   rh   rj   ro   rq   rs   r|   r~   r   r   r   r   r   r   r   r!   r   r   <module>r      s  
  U T T T T T T T T T T T       	 	 	 	 	-)< 	 	 		 	 	 	 	=( 	 	 	       	 	 	 	 	13F 	 	 		 	 	 	 	 2H 	 	 	       
	 	 	 	 	!#6	 	 		 	 	 	 	+H( 	 	 	* * * * * * * **	 	 	 	 	/1D 	 	 		 	 	 	 	0( 	 	 	       "	 	 	 	 	i!4 	 	 		 	 	 	 	y( 	 	 	$ $ $ $ $ $ $ $	 	 	 	 	>+> 	 	 		 	 	 	 	NH 	 	 	' ' ' ' ' ' ' '	 	 	 	 	/1D 	 	 		 	 	 	 	0( 	 	 	( ( ( ( ( ( ( ((	 	 	 	 	>+> 	 	 		 	 	 	 	NH 	 	 	". ". ". ". ". ". ". ".J	 	 	 	 	O-@ 	 	 		 	 	 	 	_h 	 	 	# # # # # # # #,	 	 	 	 	O-@ 	 	 		 	 	 	 	_h 	 	 	B B B B B) B B B B Br   