
    h                        S r SSKJrJrJrJr   " S S5      r " S S\\5      r " S S\\5      r " S	 S
5      r	 " S S\	\5      r
 " S S\	\5      r " S S5      r " S S\\5      r " S S\\5      r " S S5      r " S S\\5      r " S S\\5      r " S S5      r " S S\\5      r " S S \\5      r " S! S"5      r " S# S$\\5      r " S% S&\\5      r " S' S(5      r " S) S*\\5      r " S+ S,\\5      r " S- S.5      r " S/ S0\\5      r " S1 S2\\5      r " S3 S45      r " S5 S6\\5      r " S7 S8\\5      r  " S9 S:5      r! " S; S<\!\5      r" " S= S>\!\5      r# " S? S@\5      r$gA)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                   B    \ rS rSrS rS rS\l        S rS\l        Srg)	SkippingMixin   c                     [        S5      eNskip1r   selfs    b/root/1688_scrapy/alibaba-scraper/venv/lib/python3.13/site-packages/twisted/trial/test/skipping.py
test_skip1SkippingMixin.test_skip1       w    c                     [        S5      e)NzI should not get raisedRuntimeErrorr   s    r   
test_skip2SkippingMixin.test_skip2   s    455r   skip2c                 &    U R                  S5        g )NzI should not failfailr   s    r   
test_skip3SkippingMixin.test_skip3   s    		%&r   skip3 N)	__name__
__module____qualname____firstlineno__r   r   skipr   __static_attributes__r!   r   r   r   r      s#     6 JO' JOr   r   c                       \ rS rSrSrg)SynchronousSkipping!   r!   Nr"   r#   r$   r%   r'   r!   r   r   r)   r)   !       r   r)   c                       \ rS rSrSrg)AsynchronousSkipping%   r!   Nr+   r!   r   r   r.   r.   %   r,   r   r.   c                   &    \ rS rSrS rS rS rSrg)SkippingSetUpMixin)   c                     [        S5      e)N	skipSetUpr   r   s    r   setUpSkippingSetUpMixin.setUp*   s    {##r   c                     g Nr!   r   s    r   test_1SkippingSetUpMixin.test_1-       r   c                     g r8   r!   r   s    r   test_2SkippingSetUpMixin.test_20   r;   r   r!   N)r"   r#   r$   r%   r5   r9   r=   r'   r!   r   r   r1   r1   )   s    $r   r1   c                       \ rS rSrSrg)SynchronousSkippingSetUp4   r!   Nr+   r!   r   r   r@   r@   4   r,   r   r@   c                       \ rS rSrSrg)AsynchronousSkippingSetUp8   r!   Nr+   r!   r   r   rC   rC   8   r,   r   rC   c                       \ rS rSrS rSrg)DeprecatedReasonlessSkipMixin<   c                     [        5       er8   r   r   s    r   r9   $DeprecatedReasonlessSkipMixin.test_1=   s
    jr   r!   N)r"   r#   r$   r%   r9   r'   r!   r   r   rF   rF   <   s    r   rF   c                       \ rS rSrSrg)#SynchronousDeprecatedReasonlessSkipA   r!   Nr+   r!   r   r   rK   rK   A   s     	r   rK   c                       \ rS rSrSrg)$AsynchronousDeprecatedReasonlessSkipG   r!   Nr+   r!   r   r   rN   rN   G   r,   r   rN   c                   D    \ rS rSrSrS rS rS rS\l        S rS r	S	r
g
)SkippedClassMixinK   classc                 &    SU R                   l        g )NT)	__class__	_setUpRanr   s    r   r5   SkippedClassMixin.setUpN   s    #' r   c                     [        S5      er   r   r   s    r   r   SkippedClassMixin.test_skip1Q   r   r   c                     [        S5      e)NzOught to skip mer   r   s    r   r   SkippedClassMixin.test_skip2T       -..r   r   c                     g r8   r!   r   s    r   r   SkippedClassMixin.test_skip3Y   r;   r   c                     [        S5      e)NzSkip me toor   r   s    r   
test_skip4SkippedClassMixin.test_skip4\   s    =))r   r!   N)r"   r#   r$   r%   r&   r5   r   r   r   r`   r'   r!   r   r   rQ   rQ   K   s)    D( / JO*r   rQ   c                       \ rS rSrSrg)SynchronousSkippedClass`   r!   Nr+   r!   r   r   rc   rc   `   r,   r   rc   c                       \ rS rSrSrg)AsynchronousSkippedClassd   r!   Nr+   r!   r   r   rf   rf   d   r,   r   rf   c                   P    \ rS rSrS rS\l        S rS\l        S rS\l        Srg	)
	TodoMixinh   c                 &    U R                  S5        g Nzdeliberate failurer   r   s    r   
test_todo1TodoMixin.test_todo1i       		&'r   todo1c                     [        S5      eNzdeliberate errorr   r   s    r   
test_todo2TodoMixin.test_todo2n   r\   r   todo2c                     g)zunexpected successNr!   r   s    r   
test_todo3TodoMixin.test_todo3s   s    r   todo3r!   N)	r"   r#   r$   r%   rm   todors   rw   r'   r!   r   r   ri   ri   h   s,    ( JO/ JO! JOr   ri   c                       \ rS rSrSrg)SynchronousTodoy   r!   Nr+   r!   r   r   r|   r|   y   r,   r   r|   c                       \ rS rSrSrg)AsynchronousTodo}   r!   Nr+   r!   r   r   r   r   }   r,   r   r   c                   .    \ rS rSrS rS rS\l        Srg)SetUpTodoMixin   c                     [        S5      err   r   r   s    r   r5   SetUpTodoMixin.setUp   r\   r   c                     g r8   r!   r   s    r   rm   SetUpTodoMixin.test_todo1   r;   r   zsetUp todo1r!   N)r"   r#   r$   r%   r5   rm   rz   r'   r!   r   r   r   r      s    / $JOr   r   c                       \ rS rSrSrg)SynchronousSetUpTodo   r!   Nr+   r!   r   r   r   r      r,   r   r   c                       \ rS rSrSrg)AsynchronousSetUpTodo   r!   Nr+   r!   r   r   r   r      r,   r   r   c                   .    \ rS rSrS rS rS\l        Srg)TearDownTodoMixin   c                     [        S5      err   r   r   s    r   tearDownTearDownTodoMixin.tearDown   r\   r   c                     g r8   r!   r   s    r   rm   TearDownTodoMixin.test_todo1   r;   r   ztearDown todo1r!   N)r"   r#   r$   r%   r   rm   rz   r'   r!   r   r   r   r      s    / 'JOr   r   c                       \ rS rSrSrg)SynchronousTearDownTodo   r!   Nr+   r!   r   r   r   r      r,   r   r   c                       \ rS rSrSrg)AsynchronousTearDownTodo   r!   Nr+   r!   r   r   r   r      r,   r   r   c                   L    \ rS rSrSrS rS\l        S rS rS\l        S rSr	g	)
TodoClassMixin   rS   c                     g r8   r!   r   s    r   rm   TodoClassMixin.test_todo1   r;   r   methodc                     g r8   r!   r   s    r   rs   TodoClassMixin.test_todo2   r;   r   c                 &    U R                  S5        g NzDeliberate Failurer   r   s    r   rw   TodoClassMixin.test_todo3   ro   r   c                 &    U R                  S5        g r   r   r   s    r   
test_todo4TodoClassMixin.test_todo4   ro   r   r!   N)
r"   r#   r$   r%   rz   rm   rs   rw   r   r'   r!   r   r   r   r      s-    D JO( JO(r   r   c                       \ rS rSrSrg)SynchronousTodoClass   r!   Nr+   r!   r   r   r   r      r,   r   r   c                       \ rS rSrSrg)AsynchronousTodoClass   r!   Nr+   r!   r   r   r   r      r,   r   r   c                       \ rS rSrS r\S4\l        S r\\4S4\l        S r	\S4\	l        S r
\\4S	4\
l        S
 r\S4\l        S r\S4\l        S r\S4\l        Srg)StrictTodoMixin   c                     [        S5      eNzexpected failurer   r   s    r   rm   StrictTodoMixin.test_todo1   r\   r   rp   c                     [        S5      er   r   r   s    r   rs   StrictTodoMixin.test_todo2   r\   r   ru   c                     [        S5      eNzwe had no idea!r   r   s    r   rw   StrictTodoMixin.test_todo3       ,--r   ry   c                     [        S5      er   r   r   s    r   r   StrictTodoMixin.test_todo4   r   r   todo4c                 &    U R                  S5        g rl   r   r   s    r   
test_todo5StrictTodoMixin.test_todo5   ro   r   todo5c                 &    U R                  S5        g rl   r   r   s    r   
test_todo6StrictTodoMixin.test_todo6   ro   r   todo6c                     g r8   r!   r   s    r   
test_todo7StrictTodoMixin.test_todo7   r;   r   todo7r!   N)r"   r#   r$   r%   rm   r   rz   rs   OSErrorrw   r   SyntaxErrorr   r   r   r   r'   r!   r   r   r   r      s    / $W-JO/ %g.8JO. (JO.  -w7JO(  )JO( $W-JO $W-JOr   r   c                       \ rS rSrSrg)SynchronousStrictTodo   r!   Nr+   r!   r   r   r   r      r,   r   r   c                       \ rS rSrSrg)AsynchronousStrictTodo   r!   Nr+   r!   r   r   r   r      r,   r   r   c                   8    \ rS rSrS rS rS rS rS rS r	Sr
g	)
AddCleanupMixin   c                     S/U l         g )Nr5   logr   s    r   r5   AddCleanupMixin.setUp   s    9r   c                 (    S/U l         [        S5      e)Nr5   zDeliberate failure)r   r   r   s    r   brokenSetUpAddCleanupMixin.brokenSetUp   s    9/00r   c                 (    S/U l         [        S5      e)Nr5   zDon't do this)r   r   r   s    r   skippingSetUpAddCleanupMixin.skippingSetUp   s    9''r   c                 :    U R                   R                  U5        g r8   r   append)r   things     r   r   AddCleanupMixin.append   s    r   c                 :    U R                   R                  S5        g )Nr   r   r   s    r   r   AddCleanupMixin.tearDown   s    
#r   c                 :    U R                   R                  S5        g )NrunTestr   r   s    r   r   AddCleanupMixin.runTest   s    	"r   r   N)r"   r#   r$   r%   r5   r   r   r   r   r   r'   r!   r   r   r   r      s     1($#r   r   c                       \ rS rSrSrg)SynchronousAddCleanupi  r!   Nr+   r!   r   r   r   r     r,   r   r   c                       \ rS rSrSrg)AsynchronousAddCleanupi  r!   Nr+   r!   r   r   r   r     r,   r   r   c                   0    \ rS rSrSrSS jrS\l        Srg)ExpectedFailurei  zd
Hold a test that has an expected failure with an exception that has a
large string representation.
Nc                     [        SS-  5      e)z
Fail, but expectedly.
xi  r   r   s    r   "test_expectedFailureGreaterThan64k2ExpectedFailure.test_expectedFailureGreaterThan64k  s     3),--r   zshort todo stringr!   )returnN)r"   r#   r$   r%   __doc__r   rz   r'   r!   r   r   r   r     s    
. /B&+r   r   N)%r   twisted.trial.unittestr   r   r   r   r   r)   r.   r1   r@   rC   rF   rK   rN   rQ   rc   rf   ri   r|   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r!   r   r   <module>r      s  
 U T 	-)< 		=( 	 	13F 		 2H 	 
	!#6		+H( 	* **	/1D 		0( 	 "	i!4 		y( 	$ $	>+> 		NH 	' '	/1D 		0( 	( ((	>+> 		NH 	". ".J	O-@ 		_h 	# #,	O-@ 		_h 	B) Br   