
    dafw@                     z    d dl Z d dlZd dlZd Z G d dej                        Zedk(  r ej                          yy)    Nc                  *    t        j                         S N)unittest
TestResult)_s    9/root/Python-3.12.4/Lib/test/test_unittest/test_setups.pyresultFactoryr	      s          c                   ~    e Zd Zd Zd Zd Zd Zd Zd Zd Z	d Z
d	 Zd
 Zd Zd Zd Zd Zd Zd Zd Zd Zd Zy)
TestSetupsc                 \    t        j                  t        t        j                               S )N)resultclassstream)r   TextTestRunnerr	   ioStringIOselfs    r   	getRunnerzTestSetups.getRunner   s"    &&=13@ 	@r
   c                    t        j                         }|D ]2  }t         j                  j                  |      }|j	                  |       4 | j                         }t        j                         }|j                  |       |j                  t        j                                |j                  t        j                                |j                  |      S r   )r   	TestSuitedefaultTestLoaderloadTestsFromTestCaseaddTestsr   addTestrun)r   casessuitecasetestsrunner	realSuites          r   runTestszTestSetups.runTests   s    ""$ 	"D..DDTJENN5!	" ! &&(	% h((*+(,,./zz)$$r
   c                     G fddt         j                        | j                        }| j                  j                  d       | j                  |j
                  d       | j                  t        |j                        d       y )Nc                   2    e Zd ZdZe fd       Zd Zd Zy))TestSetups.test_setup_class.<locals>.Testr   c                 l    xj                   dz  c_         t        j                  j                          y N   )setUpCalledr   TestCase
setUpClassclsTests    r   r,   z4TestSetups.test_setup_class.<locals>.Test.setUpClass#   s&      A% !!,,.r
   c                      y r    r   s    r   test_onez2TestSetups.test_setup_class.<locals>.Test.test_one'       r
   c                      y r   r1   r   s    r   test_twoz2TestSetups.test_setup_class.<locals>.Test.test_two)   r3   r
   N)__name__
__module____qualname__r*   classmethodr,   r2   r5   r/   s   r   r/   r&   !   s$    K/ /r
   r/   r)      r   )r   r+   r#   assertEqualr*   testsRunlenerrorsr   resultr/   s     @r   test_setup_classzTestSetups.test_setup_class    sh    		8$$ 		 t$))1-!,V]]+Q/r
   c                     G fddt         j                        | j                        }| j                  j                  d       | j                  |j
                  d       | j                  t        |j                        d       y )Nc                   2    e Zd ZdZe fd       Zd Zd Zy),TestSetups.test_teardown_class.<locals>.Testr   c                 l    xj                   dz  c_         t        j                  j                          y r(   tearDownCalledr   r+   tearDownClassr-   s    r   rI   z:TestSetups.test_teardown_class.<locals>.Test.tearDownClass5   &    ##q(#!!//1r
   c                      y r   r1   r   s    r   r2   z5TestSetups.test_teardown_class.<locals>.Test.test_one9   r3   r
   c                      y r   r1   r   s    r   r5   z5TestSetups.test_teardown_class.<locals>.Test.test_two;   r3   r
   Nr6   r7   r8   rH   r9   rI   r2   r5   r:   s   r   r/   rE   3   $    N2 2r
   r/   r)   r;   r   r   r+   r#   r<   rH   r=   r>   r?   r@   s     @r   test_teardown_classzTestSetups.test_teardown_class2   sh    		8$$ 		 t$,,a0!,V]]+Q/r
   c                     G fddt         j                         G fddt         j                        | j                        }| j                  j                  d       | j                  j                  d       | j                  |j
                  d       | j                  t        |j                        d       y )Nc                   2    e Zd ZdZe fd       Zd Zd Zy)8TestSetups.test_teardown_class_two_classes.<locals>.Testr   c                 l    xj                   dz  c_         t        j                  j                          y r(   rG   r-   s    r   rI   zFTestSetups.test_teardown_class_two_classes.<locals>.Test.tearDownClassG   rJ   r
   c                      y r   r1   r   s    r   r2   zATestSetups.test_teardown_class_two_classes.<locals>.Test.test_oneK   r3   r
   c                      y r   r1   r   s    r   r5   zATestSetups.test_teardown_class_two_classes.<locals>.Test.test_twoM   r3   r
   NrM   r:   s   r   r/   rS   E   rN   r
   r/   c                   2    e Zd ZdZe fd       Zd Zd Zy)9TestSetups.test_teardown_class_two_classes.<locals>.Test2r   c                 l    xj                   dz  c_         t        j                  j                          y r(   rG   r.   Test2s    r   rI   zGTestSetups.test_teardown_class_two_classes.<locals>.Test2.tearDownClassR   s&    $$)$!!//1r
   c                      y r   r1   r   s    r   r2   zBTestSetups.test_teardown_class_two_classes.<locals>.Test2.test_oneV   r3   r
   c                      y r   r1   r   s    r   r5   zBTestSetups.test_teardown_class_two_classes.<locals>.Test2.test_twoX   r3   r
   NrM   r[   s   r   r[   rX   P   rN   r
   r[   r)      r   rO   )r   rA   r/   r[   s     @@r   test_teardown_class_two_classesz*TestSetups.test_teardown_class_two_classesD   s    		8$$ 				H%% 		 tU+,,a0--q1!,V]]+Q/r
   c                 ^    G d dt         j                        }| j                  |      }| j                  |j                  d       | j                  t        |j                        d       |j                  d   \  }}| j                  t        |      dt        d|j                  d       y )Nc                   (    e Zd Zed        Zd Zd Zy)7TestSetups.test_error_in_setupclass.<locals>.BrokenTestc                     t        d      Nfoo	TypeErrorr.   s    r   r,   zBTestSetups.test_error_in_setupclass.<locals>.BrokenTest.setUpClassd   s    &&r
   c                      y r   r1   r   s    r   r2   z@TestSetups.test_error_in_setupclass.<locals>.BrokenTest.test_oneg   r3   r
   c                      y r   r1   r   s    r   r5   z@TestSetups.test_error_in_setupclass.<locals>.BrokenTest.test_twoi   r3   r
   Nr6   r7   r8   r9   r,   r2   r5   r1   r
   r   
BrokenTestrc   c   s    ' 'r
   rm   r   r)   setUpClass (.))
r   r+   r#   r<   r=   r>   r?   strr6   r8   )r   rm   rA   errorr   s        r   test_error_in_setupclassz#TestSetups.test_error_in_setupclassb   s    	** 	 z*!,V]]+Q/==#qU,4j6M6MN	Pr
   c                     G fddt         j                         G fddt         j                        | j                        }| j                  |j                  d       | j                  t        |j                        d       | j                  j                  d       | j                  j                  d       |j                  d   \  }}| j                  t        |      d	t        d
j                  d       y )Nc                   2    e Zd ZdZe fd       Zd Zd Zy)5TestSetups.test_error_in_teardown_class.<locals>.Testr   c                 D    xj                   dz  c_         t        d      Nr)   rf   tornDownrh   r-   s    r   rI   zCTestSetups.test_error_in_teardown_class.<locals>.Test.tearDownClassw   s    "&&r
   c                      y r   r1   r   s    r   r2   z>TestSetups.test_error_in_teardown_class.<locals>.Test.test_one{   r3   r
   c                      y r   r1   r   s    r   r5   z>TestSetups.test_error_in_teardown_class.<locals>.Test.test_two}   r3   r
   Nr6   r7   r8   rz   r9   rI   r2   r5   r:   s   r   r/   rv   u   $    H' 'r
   r/   c                   2    e Zd ZdZe fd       Zd Zd Zy)6TestSetups.test_error_in_teardown_class.<locals>.Test2r   c                 D    xj                   dz  c_         t        d      rx   ry   rZ   s    r   rI   zDTestSetups.test_error_in_teardown_class.<locals>.Test2.tearDownClass   s    !#&&r
   c                      y r   r1   r   s    r   r2   z?TestSetups.test_error_in_teardown_class.<locals>.Test2.test_one   r3   r
   c                      y r   r1   r   s    r   r5   z?TestSetups.test_error_in_teardown_class.<locals>.Test2.test_two   r3   r
   Nr}   r^   s   r   r[   r      r~   r
   r[   r_   r;   r)   r   ztearDownClass (ro   rp   )r   r+   r#   r<   r=   r>   r?   rz   rq   r6   r8   )r   rA   rr   r   r/   r[   s       @@r   test_error_in_teardown_classz'TestSetups.test_error_in_teardown_classt   s    		8$$ 				H%% 		 tU+!,V]]+Q/*+==#qU/79J9JK	Mr
   c                      G fddt         j                        | j                         | j                  j                         y )Nc                   <    e Zd ZdZed        Ze fd       Zd Zy)ATestSetups.test_class_not_torndown_when_setup_fails.<locals>.TestFc                     t         r   rg   ri   s    r   r,   zLTestSetups.test_class_not_torndown_when_setup_fails.<locals>.Test.setUpClass   s    r
   c                 (    d_         t        d      )NTrf   ry   r-   s    r   rI   zOTestSetups.test_class_not_torndown_when_setup_fails.<locals>.Test.tearDownClass   s     $&&r
   c                      y r   r1   r   s    r   r2   zJTestSetups.test_class_not_torndown_when_setup_fails.<locals>.Test.test_one   r3   r
   N)r6   r7   r8   rz   r9   r,   rI   r2   r:   s   r   r/   r      s1    H   ' 'r
   r/   )r   r+   r#   assertFalserz   r   r/   s    @r   (test_class_not_torndown_when_setup_failsz3TestSetups.test_class_not_torndown_when_setup_fails   s5    
	8$$ 
	 	d'r
   c                      G fddt         j                         t        j                  d            | j                         | j	                  j
                         | j	                  j                         y )Nc                   D    e Zd ZdZdZe fd       Ze fd       Zd Zy)FTestSetups.test_class_not_setup_or_torndown_when_skipped.<locals>.TestFc                     d_         y NT
classSetUpr-   s    r   r,   zQTestSetups.test_class_not_setup_or_torndown_when_skipped.<locals>.Test.setUpClass   
    "&r
   c                     d_         y r   )rz   r-   s    r   rI   zTTestSetups.test_class_not_setup_or_torndown_when_skipped.<locals>.Test.tearDownClass   s
     $r
   c                      y r   r1   r   s    r   r2   zOTestSetups.test_class_not_setup_or_torndown_when_skipped.<locals>.Test.test_one   r3   r
   N)	r6   r7   r8   r   rz   r9   r,   rI   r2   r:   s   r   r/   r      s6    JH' '% %r
   r/   hop)r   r+   skipr#   r   r   rz   r   s    @r   -test_class_not_setup_or_torndown_when_skippedz8TestSetups.test_class_not_setup_or_torndown_when_skipped   s\    
	8$$ 
	 $x}}U#D)d)'r
   c                    g  G fddt               } G fddt               } G fddt        j                        } G fddt        j                        } G fd	d
t        j                        }dx|_        |_        d|_        |t        j
                  d<   |t        j
                  d<   t        j                   |d      f      }t        j                   |d      f      }t        j                   |d      f      }t        j                   |d      f      }	t        j                   |d      f      }
t        j                   |d      f      }t        j                  ||||	|
|f      }| j                         }|j                  |      }| j                  |j                  d       | j                  t        |j                        d       | j                  g d       y )Nc                   6    e Zd Ze fd       Ze fd       Zy)MTestSetups.test_setup_teardown_order_with_pathological_suite.<locals>.Module1c                  (     j                  d       y )NModule1.setUpModuleappendresultss   r   setUpModulezYTestSetups.test_setup_teardown_order_with_pathological_suite.<locals>.Module1.setUpModule       45r
   c                  (     j                  d       y )NModule1.tearDownModuler   r   s   r   tearDownModulez\TestSetups.test_setup_teardown_order_with_pathological_suite.<locals>.Module1.tearDownModule       78r
   Nr6   r7   r8   staticmethodr   r   r   s   r   Module1r      '    6 69 9r
   r   c                   6    e Zd Ze fd       Ze fd       Zy)MTestSetups.test_setup_teardown_order_with_pathological_suite.<locals>.Module2c                  (     j                  d       y )NModule2.setUpModuler   r   s   r   r   zYTestSetups.test_setup_teardown_order_with_pathological_suite.<locals>.Module2.setUpModule   r   r
   c                  (     j                  d       y )NModule2.tearDownModuler   r   s   r   r   z\TestSetups.test_setup_teardown_order_with_pathological_suite.<locals>.Module2.tearDownModule   r   r
   Nr   r   s   r   Module2r      r   r
   r   c                   J    e Zd Ze fd       Ze fd       Z fdZ fdZy)KTestSetups.test_setup_teardown_order_with_pathological_suite.<locals>.Test1c                 (    j                  d       y )Nsetup 1r   r.   r   s    r   r,   zVTestSetups.test_setup_teardown_order_with_pathological_suite.<locals>.Test1.setUpClass       y)r
   c                 (    j                  d       y )N
teardown 1r   r   s    r   rI   zYTestSetups.test_setup_teardown_order_with_pathological_suite.<locals>.Test1.tearDownClass       |,r
   c                 (    j                  d       y )NTest1.testOner   r   r   s    r   testOnezSTestSetups.test_setup_teardown_order_with_pathological_suite.<locals>.Test1.testOne       /r
   c                 (    j                  d       y )NTest1.testTwor   r   s    r   testTwozSTestSetups.test_setup_teardown_order_with_pathological_suite.<locals>.Test1.testTwo   r   r
   Nr6   r7   r8   r9   r,   rI   r   r   r   s   r   Test1r      1    * *- -00r
   r   c                   J    e Zd Ze fd       Ze fd       Z fdZ fdZy)KTestSetups.test_setup_teardown_order_with_pathological_suite.<locals>.Test2c                 (    j                  d       y )Nsetup 2r   r   s    r   r,   zVTestSetups.test_setup_teardown_order_with_pathological_suite.<locals>.Test2.setUpClass   r   r
   c                 (    j                  d       y )N
teardown 2r   r   s    r   rI   zYTestSetups.test_setup_teardown_order_with_pathological_suite.<locals>.Test2.tearDownClass   r   r
   c                 (    j                  d       y )NTest2.testOner   r   s    r   r   zSTestSetups.test_setup_teardown_order_with_pathological_suite.<locals>.Test2.testOne   r   r
   c                 (    j                  d       y )NTest2.testTwor   r   s    r   r   zSTestSetups.test_setup_teardown_order_with_pathological_suite.<locals>.Test2.testTwo   r   r
   Nr   r   s   r   r[   r      r   r
   r[   c                   J    e Zd Ze fd       Ze fd       Z fdZ fdZy)KTestSetups.test_setup_teardown_order_with_pathological_suite.<locals>.Test3c                 (    j                  d       y )Nsetup 3r   r   s    r   r,   zVTestSetups.test_setup_teardown_order_with_pathological_suite.<locals>.Test3.setUpClass   r   r
   c                 (    j                  d       y )N
teardown 3r   r   s    r   rI   zYTestSetups.test_setup_teardown_order_with_pathological_suite.<locals>.Test3.tearDownClass   r   r
   c                 (    j                  d       y )NTest3.testOner   r   s    r   r   zSTestSetups.test_setup_teardown_order_with_pathological_suite.<locals>.Test3.testOne   r   r
   c                 (    j                  d       y )NTest3.testTwor   r   s    r   r   zSTestSetups.test_setup_teardown_order_with_pathological_suite.<locals>.Test3.testTwo   r   r
   Nr   r   s   r   Test3r      r   r
   r   Moduler   r      r   )r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   )objectr   r+   r7   sysmodulesr   r   r   r<   r=   r>   r?   )r   r   r   r   r[   r   firstsecondthirdfourthfifthsixthr   r!   rA   r   s                  @r   1test_setup_teardown_order_with_pathological_suitez<TestSetups.test_setup_teardown_order_with_pathological_suite   s   	9f 	9	9f 	9
	0H%% 
	0
	0H%% 
	0
	0H%% 
	0 /765+$ 'H!(I""E)$4#67##U9%5$78""E)$4#67##U9%5$78""E)$4#67""E)$4#67""E65&%#OP!E"!,V]]+Q/B	Cr
   c                 j    G fddt                G d dt        j                        }d|_        t        j
                  d<   | j                  |      }| j                  j                  d       | j                  |j                  d       | j                  t        |j                        d       y )Nc                   &    e Zd ZdZe fd       Zy),TestSetups.test_setup_module.<locals>.Moduler   c                  0     xj                   dz  c_         y r(   )moduleSetupr   s   r   r   z8TestSetups.test_setup_module.<locals>.Module.setUpModule  s    ""a'"r
   N)r6   r7   r8   r   r   r   r   s   r   r   r   
  s    K( (r
   r   c                       e Zd Zd Zd Zy)*TestSetups.test_setup_module.<locals>.Testc                      y r   r1   r   s    r   r2   z3TestSetups.test_setup_module.<locals>.Test.test_one  r3   r
   c                      y r   r1   r   s    r   r5   z3TestSetups.test_setup_module.<locals>.Test.test_two  r3   r
   Nr6   r7   r8   r2   r5   r1   r
   r   r/   r         r
   r/   r)   r;   r   )r   r   r+   r7   r   r   r#   r<   r   r=   r>   r?   r   r/   rA   r   s      @r   test_setup_modulezTestSetups.test_setup_module	  s    	(V 	(	8$$ 	
 # &Ht$++Q/!,V]]+Q/r
   c                     G fddt                G fddt        j                         G d dt        j                        }d_        d|_        t        j
                  d<   | j                  |      }| j                  j                  d       | j                  j                  d       | j                  |j                  d       | j                  j                         | j                  j                         | j                  t        |j                        d       |j                  d   \  }}| j                  t!        |      d	       y )
Nc                   >    e Zd ZdZdZe fd       Ze fd       Zy)5TestSetups.test_error_in_setup_module.<locals>.Moduler   c                  D     xj                   dz  c_         t        d      rx   )r   rh   r   s   r   r   zATestSetups.test_error_in_setup_module.<locals>.Module.setUpModule!  s    ""a'"&&r
   c                  0     xj                   dz  c_         y r(   moduleTornDownr   s   r   r   zDTestSetups.test_error_in_setup_module.<locals>.Module.tearDownModule%      %%*%r
   N)r6   r7   r8   r   r   r   r   r   r   s   r   r   r     s3    KN' ' + +r
   r   c                   J    e Zd ZdZdZe fd       Ze fd       Zd Zd Z	y)3TestSetups.test_error_in_setup_module.<locals>.TestFc                     d_         y r   r   r-   s    r   r,   z>TestSetups.test_error_in_setup_module.<locals>.Test.setUpClass,  r   r
   c                     d_         y r   classTornDownr-   s    r   rI   zATestSetups.test_error_in_setup_module.<locals>.Test.tearDownClass/      %)"r
   c                      y r   r1   r   s    r   r2   z<TestSetups.test_error_in_setup_module.<locals>.Test.test_one2  r3   r
   c                      y r   r1   r   s    r   r5   z<TestSetups.test_error_in_setup_module.<locals>.Test.test_two4  r3   r
   N
r6   r7   r8   r   r  r9   r,   rI   r2   r5   r:   s   r   r/   r  )  ;    J!M' '* *r
   r/   c                       e Zd Zd Zd Zy)4TestSetups.test_error_in_setup_module.<locals>.Test2c                      y r   r1   r   s    r   r2   z=TestSetups.test_error_in_setup_module.<locals>.Test2.test_one8  r3   r
   c                      y r   r1   r   s    r   r5   z=TestSetups.test_error_in_setup_module.<locals>.Test2.test_two:  r3   r
   Nr   r1   r
   r   r[   r  7  r   r
   r[   r)   r   setUpModule (Module))r   r   r+   r7   r   r   r#   r<   r   r   r=   r   r   r  r>   r?   rq   r   r[   rA   rr   r   r   r/   s        @@r   test_error_in_setup_modulez%TestSetups.test_error_in_setup_module  s   		+V 		+	8$$ 		H%% 	
 ## &HtU+++Q/..2!,)++,V]]+Q/==#qU%;<r
   c                      G d dt         j                        }d|_        t        j                  j                  dd        | j                  |      }| j                  |j                  d       y )Nc                       e Zd Zd Zd Zy):TestSetups.test_testcase_with_missing_module.<locals>.Testc                      y r   r1   r   s    r   r2   zCTestSetups.test_testcase_with_missing_module.<locals>.Test.test_oneL  r3   r
   c                      y r   r1   r   s    r   r5   zCTestSetups.test_testcase_with_missing_module.<locals>.Test.test_twoN  r3   r
   Nr   r1   r
   r   r/   r  K  r   r
   r/   r   r;   )	r   r+   r7   r   r   popr#   r<   r=   )r   r/   rA   s      r   !test_testcase_with_missing_modulez,TestSetups.test_testcase_with_missing_moduleJ  sQ    	8$$ 	
 #$'t$!,r
   c                 j    G fddt                G d dt        j                        }d|_        t        j
                  d<   | j                  |      }| j                  j                  d       | j                  |j                  d       | j                  t        |j                        d       y )Nc                   &    e Zd ZdZe fd       Zy)/TestSetups.test_teardown_module.<locals>.Moduler   c                  0     xj                   dz  c_         y r(   r   r   s   r   r   z>TestSetups.test_teardown_module.<locals>.Module.tearDownModuleY  r   r
   Nr6   r7   r8   r   r   r   r   s   r   r   r  W  s    N+ +r
   r   c                       e Zd Zd Zd Zy)-TestSetups.test_teardown_module.<locals>.Testc                      y r   r1   r   s    r   r2   z6TestSetups.test_teardown_module.<locals>.Test.test_one^  r3   r
   c                      y r   r1   r   s    r   r5   z6TestSetups.test_teardown_module.<locals>.Test.test_two`  r3   r
   Nr   r1   r
   r   r/   r  ]  r   r
   r/   r)   r;   r   )r   r   r+   r7   r   r   r#   r<   r   r=   r>   r?   r   s      @r   test_teardown_modulezTestSetups.test_teardown_moduleV  s    	+V 	+	8$$ 	
 # &Ht$..2!,V]]+Q/r
   c                 x    G fddt                G fddt        j                         G d dt        j                        }d_        d|_        t        j
                  d<   | j                  |      }| j                  j                  d       | j                  |j                  d       | j                  j                         | j                  j                         | j                  t        |j                        d       |j                  d	   \  }}| j                  t        |      d
       y )Nc                   &    e Zd ZdZe fd       Zy)8TestSetups.test_error_in_teardown_module.<locals>.Moduler   c                  D     xj                   dz  c_         t        d      rx   )r   rh   r   s   r   r   zGTestSetups.test_error_in_teardown_module.<locals>.Module.tearDownModulem  s    %%*%&&r
   Nr  r   s   r   r   r%  k  s    N' 'r
   r   c                   J    e Zd ZdZdZe fd       Ze fd       Zd Zd Z	y)6TestSetups.test_error_in_teardown_module.<locals>.TestFc                     d_         y r   r   r-   s    r   r,   zATestSetups.test_error_in_teardown_module.<locals>.Test.setUpClassu  r   r
   c                     d_         y r   r  r-   s    r   rI   zDTestSetups.test_error_in_teardown_module.<locals>.Test.tearDownClassx  r  r
   c                      y r   r1   r   s    r   r2   z?TestSetups.test_error_in_teardown_module.<locals>.Test.test_one{  r3   r
   c                      y r   r1   r   s    r   r5   z?TestSetups.test_error_in_teardown_module.<locals>.Test.test_two}  r3   r
   Nr	  r:   s   r   r/   r(  r  r
  r
   r/   c                       e Zd Zd Zd Zy)7TestSetups.test_error_in_teardown_module.<locals>.Test2c                      y r   r1   r   s    r   r2   z@TestSetups.test_error_in_teardown_module.<locals>.Test2.test_one  r3   r
   c                      y r   r1   r   s    r   r5   z@TestSetups.test_error_in_teardown_module.<locals>.Test2.test_two  r3   r
   Nr   r1   r
   r   r[   r.    r   r
   r[   r)   r_   r   ztearDownModule (Module))r   r   r+   r7   r   r   r#   r<   r   r=   
assertTruer   r  r>   r?   rq   r  s        @@r   test_error_in_teardown_modulez(TestSetups.test_error_in_teardown_modulej  s    	'V 	'	8$$ 		H%% 	
 ## &HtU+..2!,(**+V]]+Q/==#qU%>?r
   c                     G d dt         j                        }| j                  |      }| j                  |j                  d       | j                  t        |j                        d       | j                  t        |j                        d       |j                  d   d   }| j                  t        |      dt        d|j                  d       y )Nc                   (    e Zd Zed        Zd Zd Zy)4TestSetups.test_skiptest_in_setupclass.<locals>.Testc                 ,    t        j                  d      re   r   SkipTestri   s    r   r,   z?TestSetups.test_skiptest_in_setupclass.<locals>.Test.setUpClass      ''..r
   c                      y r   r1   r   s    r   r2   z=TestSetups.test_skiptest_in_setupclass.<locals>.Test.test_one  r3   r
   c                      y r   r1   r   s    r   r5   z=TestSetups.test_skiptest_in_setupclass.<locals>.Test.test_two  r3   r
   Nrl   r1   r
   r   r/   r5    s    / /r
   r/   r   r)   rn   ro   rp   )r   r+   r#   r<   r=   r>   r?   skippedrq   r6   r8   )r   r/   rA   r<  s       r   test_skiptest_in_setupclassz&TestSetups.test_skiptest_in_setupclass  s    	8$$ 	 t$!,V]]+Q/V^^,a0..#A&W,4d6G6GH	Jr
   c                     G d dt         j                        } G d dt              }d|_        |t        j
                  d<   | j                  |      }| j                  |j                  d       | j                  t        |j                        d       | j                  t        |j                        d       |j                  d   d   }| j                  t        |      d       y )Nc                       e Zd Zd Zd Zy)5TestSetups.test_skiptest_in_setupmodule.<locals>.Testc                      y r   r1   r   s    r   r2   z>TestSetups.test_skiptest_in_setupmodule.<locals>.Test.test_one  r3   r
   c                      y r   r1   r   s    r   r5   z>TestSetups.test_skiptest_in_setupmodule.<locals>.Test.test_two  r3   r
   Nr   r1   r
   r   r/   r@    r   r
   r/   c                       e Zd Zed        Zy)7TestSetups.test_skiptest_in_setupmodule.<locals>.Modulec                  ,    t        j                  d      re   r7  r1   r
   r   r   zCTestSetups.test_skiptest_in_setupmodule.<locals>.Module.setUpModule  r9  r
   N)r6   r7   r8   r   r   r1   r
   r   r   rD    s    / /r
   r   r   r)   r  )r   r+   r   r7   r   r   r#   r<   r=   r>   r?   r<  rq   )r   r/   r   rA   r<  s        r   test_skiptest_in_setupmodulez'TestSetups.test_skiptest_in_setupmodule  s    	8$$ 		/V 	/
 # &Ht$!,V]]+Q/V^^,a0..#A&W'=>r
   c                     g  G fddt               } G fddt        j                        }d|_        |t        j
                  d<   t        j                  j                  |      }|j                          g d}| j                  |       y )Nc                   6    e Zd Ze fd       Ze fd       Zy)ITestSetups.test_suite_debug_executes_setups_and_teardowns.<locals>.Modulec                  (     j                  d       y )Nr   r   orderings   r   r   zUTestSetups.test_suite_debug_executes_setups_and_teardowns.<locals>.Module.setUpModule  s    .r
   c                  (     j                  d       y )Nr   r   rK  s   r   r   zXTestSetups.test_suite_debug_executes_setups_and_teardowns.<locals>.Module.tearDownModule  s     01r
   Nr   rK  s   r   r   rI    s'    / /2 2r
   r   c                   @    e Zd Ze fd       Ze fd       Z fdZy)GTestSetups.test_suite_debug_executes_setups_and_teardowns.<locals>.Testc                 (    j                  d       y )Nr,   r   r.   rL  s    r   r,   zRTestSetups.test_suite_debug_executes_setups_and_teardowns.<locals>.Test.setUpClass  s    -r
   c                 (    j                  d       y )NrI   r   rQ  s    r   rI   zUTestSetups.test_suite_debug_executes_setups_and_teardowns.<locals>.Test.tearDownClass  s    0r
   c                 (    j                  d       y )Ntest_somethingr   )r   rL  s    r   rT  zVTestSetups.test_suite_debug_executes_setups_and_teardowns.<locals>.Test.test_something  s     01r
   Nr6   r7   r8   r9   r,   rI   rT  rK  s   r   r/   rO    s,    . .1 12r
   r/   )r   r,   rT  rI   r   )
r   r   r+   r7   r   r   r   r   debugr<   )r   r   r/   r   expectedOrderrL  s        @r   .test_suite_debug_executes_setups_and_teardownsz9TestSetups.test_suite_debug_executes_setups_and_teardowns  sq    	2V 	2	28$$ 	2 # &H**@@Fj=1r
   c                     G fddt               } G fddt        j                        }d|_        |t        j
                  d<   d}t        |      D ]i  \  }t        j                  j                  |      }t        j                  |g      }| j                  t        |      5  |j                          d d d        k y # 1 sw Y   vxY w)Nc                   6    e Zd Ze fd       Ze fd       Zy)ATestSetups.test_suite_debug_propagates_exceptions.<locals>.Modulec                  &     dk(  rt        d      y )Nr   r   	Exceptionphases   r   r   zMTestSetups.test_suite_debug_propagates_exceptions.<locals>.Module.setUpModule  s    A:#M22 r
   c                  &     dk(  rt        d      y )Nr)   r   r]  r_  s   r   r   zPTestSetups.test_suite_debug_propagates_exceptions.<locals>.Module.tearDownModule  s    A:#$455 r
   Nr   r_  s   r   r   r[    s)    3 3 6 6r
   r   c                   @    e Zd Ze fd       Ze fd       Z fdZy)?TestSetups.test_suite_debug_propagates_exceptions.<locals>.Testc                 &    dk(  rt        d      y )Nr;   r,   r]  r.   r`  s    r   r,   zJTestSetups.test_suite_debug_propagates_exceptions.<locals>.Test.setUpClass  s    A:#L11 r
   c                 &    dk(  rt        d      y )N   rI   r]  re  s    r   rI   zMTestSetups.test_suite_debug_propagates_exceptions.<locals>.Test.tearDownClass  s    A:#O44 r
   c                 &    dk(  rt        d      y )Nr_   rT  r]  )r   r`  s    r   rT  zNTestSetups.test_suite_debug_propagates_exceptions.<locals>.Test.test_something  s    A:#$455 r
   NrU  r_  s   r   r/   rc    s.    2 2 5 56r
   r/   )r   r   r,   rI   rT  )r   r   r+   r7   r   r   	enumerater   r   r   assertRaisesRegexr^  rV  )r   r   r/   messagesmsg_suiter   r`  s          @r   &test_suite_debug_propagates_exceptionsz1TestSetups.test_suite_debug_propagates_exceptions  s    	6V 	6	68$$ 	6 # &He#H- 	JE3//EEdKF&&x0E''	37  	 s   &CC	N)r6   r7   r8   r   r#   rB   rP   r`   rs   r   r   r   r   r   r  r  r"  r2  r=  rF  rX  rn  r1   r
   r   r   r      sl    @% 0$0$0<P$MB( ($PCd0(+=Z
-0(&@PJ$?,2: r
   r   __main__)r   r   r   r	   r+   r   r6   mainr1   r
   r   <module>rq     sB    	 
 !l"" l^ zHMMO r
   