
    ij]                        S SK r S SKrS SKrS SKJr  S SKJr   S SKJrJ	r	  SSKJrJrJrJrJrJrJrJrJr  S	 rS
 r\" 5       r\R/                  S5      r\S:H  r\S:H  r\\\=(       a    \\S.r\" 5       rS}S jrS rSSSS\" S5      \" SSS9/r \" S/ SQ5        \" \ 5      S}S j5       r! " S S\"5      r#\(       d   " S S\"5      r$S  r%\RL                  " S!5       " S" S#\5      5       r'\RL                  " S!5       " S$ S%\"5      5       r( " S& S'\5      r) " S( S)\"5      r*\" SS*/5        \" S/5      \RL                  " S+5      S, 5       5       r+\RL                  RY                  S-\RZ                  S.9 " S/ S0\5      5       r.\" SS1/5        \" S/5      \RL                  RY                  S-\RZ                  \RZ                  S29S3 5       5       r/ " S4 S5\5      r0 " S6 S7\5      r1S8 r2S9 r3S: r4S; r5\" S<S=/5        \" S> 5      S? 5       r6S@ r7SA r8SB r9 " SC SD5      r:\" SE\" 5       / 4SF\" 5       / 4SF\" SSSG9SHSISJS04/4SJ\" S5      SK/4SL\" S5      SK/4SL\" SSM5      SKSN/4SO\" SSMS9SKSISPSM04/4SQ\" 5       SR/4SQ\" S5      SS/4ST\" S5      SSSU/4ST\" SSV5      SSSW/4ST\" SSVSX5      / SYQ4ST\" SSVSZ9SSSW/4ST\" SSVS[9SSSUSIS\SV04/4ST\" SSVSXSXS[9SSSWS]SIS\SX04/4/5      S^ 5       r;\" / S_Q5      S~S` j5       r<\" SG/5      Sa 5       r=\>" Sb5       V s/ s H	  o U S-   4PM     sn r?\" \?5      Sc 5       r@\" SdSeSf/5       " Sg Sh\5      5       rA\" SiSjSk/Sl Sm9 " Sn So\5      5       rB\" SJS0SPSp0SqSrSsSt./5       " Su Sv\5      5       rC " Sw Sx\"5      rD\R                  R                  SX:X  a-  \R                  R                  Sy:  a  S SzKJHrH   " S{ S|\H5      rIggg! \
 a
    S rS r	 GNf = fs  sn f )    Nwraps)TestCase)assert_equalassert_raisesc                  6    [        5       R                  " U 0 UD6$ N)r   assertEqualargskwdss     Q/var/www/html/ai-image-ml/venv/lib/python3.13/site-packages/parameterized/test.pyr   r      s    z%%t4t44    c                  6    [        5       R                  " U 0 UD6$ r	   )r   assertRaisesr   s     r   r   r      s    z&&555r      )	PY3PY2parameterizedparam"parameterized_argument_value_pairs
short_reprdetect_runnerparameterized_classSkipTestc                 2    X;  a  [        U< SU < 35      eg )Nz not in )AssertionError)haystackneedles     r   assert_containsr       s    fh?@@ r   c                    ^ ^ U U4S jnU$ )a  
Assert that a wrapped `unittest.TestCase` method raises an error matching the given type and message regex.

:param expected_exception: Exception class expected to be raised.
:param expected_regexp: Regexp (re pattern object or string) expected to be found in error message.
c                 6   >^  [        T 5      UUU 4S j5       nU$ )Nc                 v   > U R                  TT5         T" U /UQ70 UD6  S S S 5        g ! , (       d  f       g = fr	   )assertRaisesRegexp)selfr   kwargsexpected_exceptionexpected_regexpfuncs      r   wrapperGassert_raises_regexp_decorator.<locals>.func_decorator.<locals>.wrapper$   s3    (();_MT+D+F+ NMMs   *
8r   )r)   r*   r'   r(   s   ` r   func_decorator6assert_raises_regexp_decorator.<locals>.func_decorator#   s     	t	, 
	, r    )r'   r(   r,   s   `` r   assert_raises_regexp_decoratorr/      s     r   unittestnose2pytest)	generator
standalonepy2nose2r2   c                     Uc  U nS n [        S U =(       d    SR                  5        5       5      (       a  g [        R                  U5        g )Nc              3   L   #    U  H  n[         R                  U5      v   M     g 7fr	   )
SKIP_FLAGSget).0fs     r   	<genexpr>expect.<locals>.<genexpr>C   s     
;&::>>!&:s   "$ )anysplitmissing_testsupdate)skiptestss     r   expectrE   ?   s@    }

;tzr&8&8&:
;;;r   c                     [        U [        5      (       d  U /n [        X5      n[        R                  " 5       R
                  R                  nU  H  nXT;   d  M
  XE   nU" U5      nXtU'   M     g)aJ  
Assert that the given `unittest.TestCase` tests raise an error matching the given type and message regex.

:param tests: A single test name or list of test names.
:param expected_exception: Exception class expected to be raised.
:param expected_regexp: Regexp (re pattern object or string) expected to be found in error message.
N)
isinstancelistr/   inspectcurrentframef_backf_locals)rD   r'   r(   	decoratorframe_localstesttest_methoddecorated_test_methods           r   expect_exception_matching_regexrR   H   sh     eT""./ASI'')0099L&,K$-k$:!!6	 r   *   foo0s   bar{   foo1foo2rT   )barr4   )z!test_naked_function(42, bar=None)z%test_naked_function('foo0', bar=None)z%test_naked_function(b'bar', bar=None)z"test_naked_function(123, bar=None)z%test_naked_function('foo1', bar=None)z#test_naked_function('foo2', bar=42)c                 @    [         R                  SU < SU< S35        g )Nztest_naked_function(, bar=)rA   remove)foorY   s     r   test_naked_functionr`   o   s    S#FGr   c                   J    \ rS rSr\" S/ SQ5        \" \5      SS j5       rSrg)TestParameterizedt   r3   )z"test_instance_method(42, bar=None)z&test_instance_method(b'bar', bar=None)z#test_instance_method(123, bar=None)z&test_instance_method('foo0', bar=None)z&test_instance_method('foo1', bar=None)z$test_instance_method('foo2', bar=42)Nc                 @    [         R                  SU< SU< S35        g )Nztest_instance_method(r[   r\   r]   r%   r_   rY   s      r   test_instance_method&TestParameterized.test_instance_method~   s    #sKLr   r.   r	   )	__name__
__module____qualname____firstlineno__rE   r   test_paramsrf   __static_attributes__r.   r   r   rb   rb   t   s,    
;   ;M  Mr   rb   c                   b    \ rS rSr\" S/ SQ5        / SQrSrS rS r\	" SS	/5      S
 5       r
Srg)TestSetupTeardown   r3   )ztest_setup(setup 1)zteardown_called(teardown 1)ztest_setup(setup 2)zteardown_called(teardown 2))zsetup 1z
teardown 1zsetup 2z
teardown 2zerror: setup not calledc                 D    U R                   R                  S5      U l        g )Nr   )stackpopactual_orderr%   s    r   setUpTestSetupTeardown.setUp   s     $

q 1Dr   c                 j    [         R                  SU R                  R                  S5      < S35        g )Nzteardown_called(r   r\   )rA   r^   rr   rs   ru   s    r   tearDownTestSetupTeardown.tearDown   s       9J!MNr   r      c                     [        U R                  SU< 35        [        R                  SU R                  < S35        g )Nzsetup ztest_setup(r\   )r   rt   rA   r^   )r%   countas      r   
test_setupTestSetupTeardown.test_setup   s,    **,AB  D4E4E!HIr   )rt   N)rh   ri   rj   rk   rE   rr   rt   rv   ry   r   r   rm   r.   r   r   ro   ro      sH    { 
 	 C0	2	O 
u~	&	J 
'	Jr   ro   c                    ^  U 4S jnU$ )Nc                 t   > UR                   S   nU R                  ST-  -   [        R                  " U5      -   $ )Nr   z	_%s_name_)r   rh   r   to_safe_name)testcase_func	param_numr   arg
custom_tags       r   custom_naming_func.custom_naming_func.<locals>.custom_naming_func   s7    jjm%%z)AB]E_E_`cEdddr   r.   )r   r   s   ` r   r   r      s    e r   z	os.getpidc                   @   \ rS rSr\" / SQ5        \R                  " SS\" S5      /5      \R                  " S5      S 5       5       r
\" / SQ5        \R                  " S	S
\" SS5      /5      \R                  " S5      \R                  " S5      S 5       5       5       rSrg),TestParameterizedExpandWithMockPatchForClass   )z<test_one_function_patch_decorator('foo1', 'umask', 'getpid')z<test_one_function_patch_decorator('foo0', 'umask', 'getpid')z8test_one_function_patch_decorator(42, 'umask', 'getpid')rS   rU   rW   os.umaskc           	      p    [         R                  SU< SUR                  < SUR                  < S35        g Nz"test_one_function_patch_decorator(, r\   rA   r^   
_mock_name)r%   r_   
mock_umaskmock_getpids       r   !test_one_function_patch_decoratorNTestParameterizedExpandWithMockPatchForClass.test_one_function_patch_decorator   s+     	!:#8#8)446 	7r   )zKtest_multiple_function_patch_decorator(42, 51, 'umask', 'fdopen', 'getpid')zStest_multiple_function_patch_decorator('foo0', 'bar0', 'umask', 'fdopen', 'getpid')zStest_multiple_function_patch_decorator('foo1', 'bar1', 'umask', 'fdopen', 'getpid')rT   3   rU   bar0bar1	os.fdopenc                     [         R                  SU< SU< SUR                  < SUR                  < SUR                  < S35        g Nz'test_multiple_function_patch_decorator(r   r\   r   )r%   r_   rY   r   mock_fdopenr   s         r   &test_multiple_function_patch_decoratorSTestParameterizedExpandWithMockPatchForClass.test_multiple_function_patch_decorator   s7    
 	!3
(=(=)44k6L6LN 	Or   r.   N)rh   ri   rj   rk   rE   r   expandr   mockpatchr   r   rm   r.   r   r   r   r      s    
   665=9:	ZZ
7  ;7
    8%5uVV7LMN	ZZ	ZZ
O   OOr   r   c                   p    \ rS rSr\" SS/5        \" S/5      \R                  " S5      S 5       5       rSr	g)	#TestParameterizedExpandWithNoExpand   r3   z5test_patch_class_no_expand(42, 51, 'umask', 'getpid')r   r   c                 x    [         R                  SU< SU< SUR                  < SUR                  < S3	5        g )Nztest_patch_class_no_expand(r   r\   r   )r%   r_   rY   r   r   s        r   test_patch_class_no_expand>TestParameterizedExpandWithNoExpand.test_patch_class_no_expand   s-     	!3
(=(=)446 	7r   r.   N)
rh   ri   rj   rk   rE   r   r   r   r   rm   r.   r   r   r   r      s@    
;?  H:	ZZ
7  7r   r   c                      \ rS rSr\" / SQ5        \R                  " SS\" S5      /5      \R                  " S5      S 5       5       r
\" / SQ5        \R                  " S	S
\" SS5      /5      \R                  " S5      \R                  " S5      S 5       5       5       r\" SS/5        \R                  " SS/5      \R                  " S5      S 5       5       r\" SS/\SS9  Srg).TestParameterizedExpandWithNoMockPatchForClass   )z2test_one_function_patch_decorator('foo1', 'umask')z2test_one_function_patch_decorator('foo0', 'umask')z.test_one_function_patch_decorator(42, 'umask')rS   rU   rW   r   c                 T    [         R                  SU< SUR                  < S35        g r   r   r%   r_   r   s      r   r   PTestParameterizedExpandWithNoMockPatchForClass.test_one_function_patch_decorator   s"     	!:#8#8: 	;r   )zAtest_multiple_function_patch_decorator(42, 51, 'umask', 'fdopen')zItest_multiple_function_patch_decorator('foo0', 'bar0', 'umask', 'fdopen')zItest_multiple_function_patch_decorator('foo1', 'bar1', 'umask', 'fdopen')r   r   r   r   c                 x    [         R                  SU< SU< SUR                  < SUR                  < S3	5        g r   r   )r%   r_   rY   r   r   s        r   r   UTestParameterizedExpandWithNoMockPatchForClass.test_multiple_function_patch_decorator   s-    
 	!3
(=(=)446 	7r   z>test_patch_decorator_over_test_with_error('foo_this', 'umask')z>test_patch_decorator_over_test_with_error('foo_that', 'umask'))foo_this)foo_thatc                 t    [         R                  SR                  XR                  5      5        [	        S5      e)Nz5test_patch_decorator_over_test_with_error({!r}, {!r})z"This error should have been caught)rA   r^   formatr   
ValueErrorr   s      r   )test_patch_decorator_over_test_with_errorXTestParameterizedExpandWithNoMockPatchForClass.test_patch_decorator_over_test_with_error   s4     	CJJ3PePef	
 =>>r   4test_patch_decorator_over_test_with_error_0_foo_this4test_patch_decorator_over_test_with_error_1_foo_thatz$^This error should have been caught$)rD   r'   r(   r.   N)rh   ri   rj   rk   rE   r   r   r   r   r   r   r   r   rR   r   rm   r.   r   r   r   r      s   
   665=9:	ZZ
;  ;;    8%5uVV7LMN	ZZ	ZZ
7   O7 HH 
   
ZZ
? 	
? $BB
 &>r   r   c                   p    \ rS rSr\" SS/5        \" S/5      \R                  " S5      S 5       5       rSr	g)	6TestParameterizedExpandWithNoMockPatchForClassNoExpandi  r3   z%test_patch_no_expand(42, 51, 'umask')r   r   c           	      \    [         R                  SU< SU< SUR                  < S35        g )Nztest_patch_no_expand(r   r\   r   )r%   r_   rY   r   s       r   test_patch_no_expandKTestParameterizedExpandWithNoMockPatchForClassNoExpand.test_patch_no_expand  s%     	!3
(=(=? 	@r   r.   N)
rh   ri   rj   rk   rE   r   r   r   r   rm   r.   r   r   r   r     sB    
;/  H:	ZZ
@  @r   r   z0test_mock_patch_standalone_function(42, 'umask')r   c                 T    [         R                  SU < SUR                  < S35        g )Nz$test_mock_patch_standalone_function(r   r\   r   )r_   r   s     r   #test_mock_patch_standalone_functionr     s"     &&	
r   os)umaskc                       \ rS rSr\" SS/5        \R                  " S/5      \R                  R                  S\R                  S9S 5       5       r\R                  " S/5      S	 5       rS
rg),TestParameterizedExpandWithMockPatchMultiplei&  z@test_mock_patch_multiple_expand_on_method(42, 'umask', 'getpid')z5test_mock_patch_multiple_expand_on_class(16, 'umask')rS   r   )getpidc           	      p    [         R                  SU< SUR                  < SUR                  < S35        g )Nz*test_mock_patch_multiple_expand_on_method(r   r\   r   )r%   r   r   r   s       r   )test_mock_patch_multiple_expand_on_methodVTestParameterizedExpandWithMockPatchMultiple.test_mock_patch_multiple_expand_on_method-  s*     	u''):):	
r   )   c                 T    [         R                  SU< SUR                  < S35        g )Nz)test_mock_patch_multiple_expand_on_class(r   r\   r   )r%   r   r   s      r   (test_mock_patch_multiple_expand_on_classUTestParameterizedExpandWithMockPatchMultiple.test_mock_patch_multiple_expand_on_class6  s     u''	
r   r.   N)rh   ri   rj   rk   rE   r   r   r   r   multipleDEFAULTr   r   rm   r.   r   r   r   r   &  sw    
J? 
 6(#	ZZdll3
 4 $
 6(#
 $
r   r   z:test_mock_patch_multiple_standalone(42, 'umask', 'getpid'))r   r   c           	      p    [         R                  SU < SUR                  < SUR                  < S35        g )Nz$test_mock_patch_multiple_standalone(r   r\   r   )r   r   r   s      r   #test_mock_patch_multiple_standaloner   B  s*     5##V%6%6	
r   c                       \ rS rSr\" / SQ5        \R                  " \5      S
S j5       r\" / SQ5        \R                  " \\	" S5      S9S
S j5       r
S	rg)TestParamerizedOnTestCaseiM  )ztest_on_TestCase(42, bar=None)z"test_on_TestCase(b'bar', bar=None)ztest_on_TestCase(123, bar=None)z"test_on_TestCase('foo0', bar=None)z"test_on_TestCase('foo1', bar=None)z test_on_TestCase('foo2', bar=42)Nc                 @    [         R                  SU< SU< S35        g )Nztest_on_TestCase(r[   r\   r]   re   s      r   test_on_TestCase*TestParamerizedOnTestCase.test_on_TestCaseW  s    c3GHr   )z.test_on_TestCase2_custom_name_42(42, bar=None)z6test_on_TestCase2_custom_name_b_bar_(b'bar', bar=None)z0test_on_TestCase2_custom_name_123(123, bar=None)z4test_on_TestCase2_custom_name_foo0('foo0', bar=None)z4test_on_TestCase2_custom_name_foo1('foo1', bar=None)z2test_on_TestCase2_custom_name_foo2('foo2', bar=42)custom)	name_funcc           	         [         R                  " 5       nUS   nUS   R                  nUS   S   R                  nS[        R
                  " U5      -   n[        XgSU< SU< S35        [        R                  U< SU< S	U< S
35        g )Nr   r   r   test_on_TestCase2_custom_name_zTest Method name 'z'' did not get customized to expected: ''(r[   r\   )	rI   rr   rL   _testMethodNamer   r   r   rA   r^   )r%   r_   rY   rr   framerN   nose_test_method_nameexpected_names           r   test_on_TestCase2+TestParamerizedOnTestCase.test_on_TestCase2d  s     aQx(( ,S 1! 4 D D8=;U;UVY;ZZ*M+]<	= 	sCHIr   r.   r	   )rh   ri   rj   rk   rE   r   r   rl   r   r   r   rm   r.   r   r   r   r   M  sl    
   +&I 'I    +$6x$@B	JB	Jr   r   c                      \ rS rSrSS jr\R                  " \" S5      /S S9SS j5       r\R                  " \" S5      /5      S 5       r	\R                  " \" S5      /5      S	 5       r
\R                  " \" S5      /5      S
 5       r\R                  " \" S5      /5      S 5       r\R                  " \" S5      /5      SS j5       r\R                  " \" S5      /5      SS j5       rSrg) TestParameterizedExpandDocstringir  c                    [         R                  " 5       nUS   S   R                  nUR                  S5      =(       dJ    UR                  S5      =(       d2    UR                  S5      =(       d    UR                  S5      =(       d    SnUc  [	        S5      eUR
                  nU(       a  UR                  5       n[        Xa5        g)	zZChecks the current test method's docstring. Must be called directly
from the test method.    r   
testMethodfunctionmethodtestfunctionNz-uh oh, unittest changed a local variable name)rI   rr   rL   r9   r   __doc__rstripr   )r%   expected_docstringr   rr   rL   rP   actual_docstrings          r   _assert_docstring2TestParameterizedExpandDocstring._assert_docstrings  s     8A;''LL& LL$LL" LL(  	  !PQQ&../668%:r   r_   c                     g)Nstuffr.   )r;   nps      r   <lambda>)TestParameterizedExpandDocstring.<lambda>  s    7r   )doc_funcNc                 &    U R                  S5        g)Documentationr   Nr   re   s      r   test_custom_doc_func5TestParameterizedExpandDocstring.test_custom_doc_func  s     	w'r   c                 0    U R                  SU< S35        g)zDocumentation.Documentation [with foo=].Nr   r%   r_   s     r   test_single_line_docstring;TestParameterizedExpandDocstring.test_single_line_docstring  s     	FGr   c                 0    U R                  SU< S35        g)r>   z
[with foo=]Nr   r  s     r   test_empty_docstring5TestParameterizedExpandDocstring.test_empty_docstring  s     	78r   c                 0    U R                  SU< S35        g)zDocumentation.

Morer  z].

        MoreNr   r  s     r   test_multiline_documentation=TestParameterizedExpandDocstring.test_multiline_documentation  s    
 	 $	
r   c                 0    U R                  SU< S35        g)u   Döcumentation.u   Döcumentation [with foo=r  Nr   r  s     r   test_unicode_docstring7TestParameterizedExpandDocstring.test_unicode_docstring  s     	#HIr   c                 8    U R                  SU< SU< S35        g)r   r  r[   r  Nr   re   s      r   %test_default_values_get_correct_valueFTestParameterizedExpandDocstring.test_default_values_get_correct_value  s     	sCPQr   c                 6    U R                  SU< SU< S3SS9  g)z
Documentation
r  r[   r  T)r   Nr   re   s      r   test_with_leading_newline:TestParameterizedExpandDocstring.test_with_leading_newline  s    
 	sCPY]^r   r.   )Fr	   )   )rh   ri   rj   rk   r   r   r   r   r   r  r  r  r  r  r  rm   r.   r   r   r   r   r  s   ;& 5<.#:<(<( 5<.)H *H 5<.)9 *9 5<.)
 *
 5<.)J *J 5>*+R ,R 5>*+_ ,_r   r   c                        " S S[         5      n [        S5      e! [         a  n[        [	        U5      S5         S nAg S nAff = f)Nc                   2    \ rS rSr\" S/5      S 5       rSrg)ctest_warns_when_using_parameterized_with_TestCase.<locals>.TestTestCaseWarnsOnBadUseOfParameterizedi  rS   c                     g r	   r.   r  s     r   test_in_subclass_of_TestCaseڀtest_warns_when_using_parameterized_with_TestCase.<locals>.TestTestCaseWarnsOnBadUseOfParameterized.test_in_subclass_of_TestCase      r   r.   N)rh   ri   rj   rk   r   r  rm   r.   r   r   (TestTestCaseWarnsOnBadUseOfParameterizedr    s    F8$ %r   r  Expected exception not raisedparameterized.expand)r   r   	Exceptionr    str)r  es     r   1test_warns_when_using_parameterized_with_TestCaser$    sE    >	x 	 <==  8A 6778    
AA  Ac                       [        / 5      " S 5        [        S5      e! [         a  n [        [	        U 5      S5         S n A g S n A ff = f)Nc                      g r	   r.   r.   r   r   r   <test_helpful_error_on_empty_iterable_input.<locals>.<lambda>  s    $r   r  iterable is empty)r   r   r   r    r"  r#  s    r   *test_helpful_error_on_empty_iterable_inputr+    sF    >b,' <==  5A 3445s    
AAAc                  F    [        / SS9" S 5      n [        [        U 5        g )NT)skip_on_emptyc                      g r	   r.   r.   r   r   r   2test_skip_test_on_empty_iterable.<locals>.<lambda>  s    r   )r   r   r   )r)   s    r    test_skip_test_on_empty_iterabler0    s    40>D(D!r   c                        " S S[         5      n [        S5      e! [         a  n[        [	        U5      S5         S nAg S nAff = f)Nc                   D    \ rS rSr\R
                  " / 5      S 5       rSrg)Rtest_helpful_error_on_empty_iterable_input_expand.<locals>.ExpectErrorOnEmptyInputi  c                     g r	   r.   ru   s    r   test_expect_errordtest_helpful_error_on_empty_iterable_input_expand.<locals>.ExpectErrorOnEmptyInput.test_expect_error  r  r   r.   N)rh   ri   rj   rk   r   r   r5  rm   r.   r   r   ExpectErrorOnEmptyInputr3    s    !!"% &r   r7  r  r)  )r   r   r   r    r"  )r7  r#  s     r   1test_helpful_error_on_empty_iterable_input_expandr8    sE    >	h 	 <==  5A 3445r%  zstadalone generatorz"test_wrapped_iterable_input('foo')c                      [        S/5      $ )Nr_   )iterr.   r   r   r   r     s
    tUG}r   c                 8    [         R                  SU < S35        g )Nztest_wrapped_iterable_input(r\   r]   r_   s    r   test_wrapped_iterable_inputr=    s    SCDr   c                       [        S 5      " S 5        [        S5      e! [         a  n [        [	        U 5      S5         S n A g S n A ff = f)Nc                      g)NrT   r.   r.   r   r   r   :test_helpful_error_on_non_iterable_input.<locals>.<lambda>  s    br   c                      g r	   r.   r.   r   r   r   r@    s    $r   r  zis not iterable)r   r   r!  r    r"  r*  s    r   (test_helpful_error_on_non_iterable_inputrB    sF    >j!,/ <==  3A 1223s     
A	AA	c                  L    [        [        [        5      5      n [        U / 5        g r	   )sortedrH   rA   r   )missings    r   tearDownModulerF    s    T-()G"r   c                  B   [         (       a  [        S5      e " S S5      n  [        U " 5       R                  5       5        [	        S5      e! [
         aI  n[        [        U5      S5        [        [        U5      S5        [        [        U5      S5         S nAg S nAff = f)Nz"Py3 doesn't have old-style classesc                   2    \ rS rSr\" S/5      S 5       rSrg)-test_old_style_classes.<locals>.OldStyleClassi  r_   c                     g r	   r.   r%   r   s     r   parameterized_methodBtest_old_style_classes.<locals>.OldStyleClass.parameterized_method  s    r   r.   N)rh   ri   rj   rk   r   rL  rm   r.   r   r   OldStyleClassrI    s    	w		 
 	r   rN  z0expected TypeError not raised by old-style classz	new-styler   )r   r   rH   rL  r   	TypeErrorr    r"  )rN  r#  s     r   test_old_style_classesrP    s    
s;<< Q]_1134 OPP  1A,A 67A001s   A 
B?BBc                   ^    \ rS rSr\" SSS/5        \R                  " SS/5      S 5       rSrg	)
TestOldStyleClassi  zpy2nose2 generatorztest_on_old_style_class('foo')ztest_on_old_style_class('bar')r_   rY   c                 8    [         R                  SU< S35        g )Nztest_on_old_style_class(r\   r]   rK  s     r   rP  (TestOldStyleClass.test_old_style_classes  s    UEFr   r.   N)	rh   ri   rj   rk   rE   r   r   rP  rm   r.   r   r   rR  rR    s=    
((" 
 5%.)G *Gr   rR  r>   z*a, **kwr<  )*ar{   z**kwr_   )r_   r   zfoo, *a	   )rU  )rV  zfoo, *a, **kwrY   zx=9)xrV  rW  r   zx, y=9, *a, **kw)yrV  r}   rY  r}   r   )rX  rZ  rU  )r   )rY  )zr\  r[  c                 P    [        SU < S35      n[        X15      n[        XB5        g )Nzlambda z: None)evalr   r   )func_paramsr   expectedhelperactuals        r   'test_parameterized_argument_value_pairsrc    s#    $ k45F/:F"r   ))abcdz'abcd')	123456789z	'12...89')[z	123...789)rf  z12...89   c                 *    [        [        XS9U5        g )N)r   )r   r   )inputr`  r   s      r   test_short_reprrj    s     E'2r   c                     g)zDocstring! Nr.   )ri  s    r   test_with_docstringrl  '  s    
 	r      c                      [        XS-
  5        g )Nr   )r   )ri  r`  s     r   test_cases_over_10ro  1  s    
#r   )r   bc)r_   r   r}   )r   r   r}   c                   @    \ rS rSr\" / SQ5        S rS rS rS rSr	g)	TestParameterizedClassi6  )z7TestParameterizedClass_0_foo:test_method_a('foo', 1, 2)z7TestParameterizedClass_0_foo:test_method_b('foo', 1, 2)z>TestParameterizedClass_0_foo:testCamelCaseMethodC('foo', 1, 2)z/TestParameterizedClass_1:test_method_a(0, 1, 2)z/TestParameterizedClass_1:test_method_b(0, 1, 2)z6TestParameterizedClass_1:testCamelCaseMethodC(0, 1, 2)c                 &   [        U S5      (       d   e[        U R                  U R                  -   S5        [        R                  U R                  R                  < SU< SU R                  < SU R                  < SU R                  < S3
5        g )Nr   r   :r   r   r\   )	hasattrr   rp  rq  rA   r^   	__class__rh   r   )r%   	test_names     r   _assertions"TestParameterizedClass._assertionsD  sc    tS!!!!TVVdff_a(NN##FFFFFF
 	r   c                 &    U R                  S5        g )Ntest_method_ary  ru   s    r   r|  $TestParameterizedClass.test_method_aO      )r   c                 &    U R                  S5        g )Ntest_method_br}  ru   s    r   r  $TestParameterizedClass.test_method_bR  r  r   c                 &    U R                  S5        g )NtestCamelCaseMethodCr}  ru   s    r   r  +TestParameterizedClass.testCamelCaseMethodCU  s    /0r   r.   N)
rh   ri   rj   rk   rE   ry  r|  r  r  rm   r.   r   r   rs  rs  6  s%    
   	**1r   rs  )r   r{   r|   c                 .    U R                   < SUS   < 3$ )N_custom_func_r   )rh   )clsidxattrss      r   r   r   \  s    uUXz+Zr   )class_name_funcc                   .    \ rS rSr\" SS/5        S rSrg)TestNamedParameterizedClassiY  z8TestNamedParameterizedClass_custom_func_1:test_method(1)z8TestNamedParameterizedClass_custom_func_2:test_method(2)c                 z    [         R                  U R                  R                  < SU R                  < S35        g )N:test_method(r\   )rA   r^   rw  rh   r   ru   s    r   rP   'TestNamedParameterizedClass.test_methodc  s)    NN##FF
 	r   r.   N)rh   ri   rj   rk   rE   rP   rm   r.   r   r   r  r  Y  s    
 BB 
r   r  z
some stuffzother stuffz	some namer  )rY   namer_   c                   V   ^  \ rS rSr\" / SQ5        SrSrU 4S jrU 4S jrS r	Sr
U =r$ )	TestParameterizedClassDictij  )	z/TestParameterizedClassDict_0:setUp(42, 'empty')z5TestParameterizedClassDict_0:test_method(42, 'empty')z2TestParameterizedClassDict_0:tearDown(42, 'empty')z>TestParameterizedClassDict_1_some_stuff:setUp(0, 'some stuff')zDTestParameterizedClassDict_1_some_stuff:test_method(0, 'some stuff')zATestParameterizedClassDict_1_some_stuff:tearDown(0, 'some stuff')z?TestParameterizedClassDict_2_some_name:setUp(12, 'other stuff')zETestParameterizedClassDict_2_some_name:test_method(12, 'other stuff')zBTestParameterizedClassDict_2_some_name:tearDown(12, 'other stuff')r   emptyc                    > [         [        U ]  5         [        R	                  U R
                  R                  < SU R                  < SU R                  < S35        g )Nz:setUp(r   r\   )	superr  rv   rA   r^   rw  rh   r_   rY   r%   rw  s    r   rv    TestParameterizedClassDict.setUp  s?    ($57NN##HHHH
 	r   c                    > [         [        U ]  5         [        R	                  U R
                  R                  < SU R                  < SU R                  < S35        g )Nz
:tearDown(r   r\   )	r  r  ry   rA   r^   rw  rh   r_   rY   r  s    r   ry   #TestParameterizedClassDict.tearDown  s?    ($8:NN##HHHH
 	r   c                     [         R                  U R                  R                  < SU R                  < SU R
                  < S35        g )Nr  r   r\   )rA   r^   rw  rh   r_   rY   ru   s    r   rP   &TestParameterizedClassDict.test_method  s0    NN##HHHH
 	r   r.   )rh   ri   rj   rk   rE   r_   rY   rv   ry   rP   rm   __classcell__)rw  s   @r   r  r  j  s2      
 
 C
C r   r  c                   H    \ rS rSr\R
                  " SS/5      S 5       rSrg)TestUnicodeDocstringi  value1u
   vålüé¡c                     g)uK   Это док-стринг, содержащий не-ascii символы Nr.   rK  s     r   rl  (TestUnicodeDocstring.test_with_docstring  s     	r   r.   N)rh   ri   rj   rk   r   r   rl  rm   r.   r   r   r  r    s*     	r   r     )IsolatedAsyncioTestCasec                       \ rS rSr\" / SQ5        \R                  " SS\" S5      /5      S 5       r\R                  " SS\" S5      /5      \	R                  " S5      S 5       5       rS	rg
)3TestAsyncParameterizedExpandWithNoMockPatchForClassi  )ztest_one_async_function('foo1')ztest_one_async_function('foo0')ztest_one_async_function(42)z8test_one_async_function_patch_decorator('foo1', 'umask')z8test_one_async_function_patch_decorator('foo0', 'umask')z4test_one_async_function_patch_decorator(42, 'umask')rS   rU   rW   c                 @   #    [         R                  SU< S35        g 7f)Nztest_one_async_function(r\   r]   r  s     r   test_one_async_functionKTestAsyncParameterizedExpandWithNoMockPatchForClass.test_one_async_function  s       #!HIs   r   c                 \   #    [         R                  SU< SUR                  < S35        g 7f)Nz(test_one_async_function_patch_decorator(r   r\   r   r   s      r   'test_one_async_function_patch_decorator[TestAsyncParameterizedExpandWithNoMockPatchForClass.test_one_async_function_patch_decorator  s%        "%z'<'<"> ?s   *,r.   N)rh   ri   rj   rk   rE   r   r   r   r  r   r   r  rm   r.   r   r   r  r    sv     
 	 
		ufeFm<	=	J 
>	J 
		ufeFm<	=	J		? 
  
>	?r   r  r	   )   )JrI   sysr   	functoolsr   r0   r   
nose.toolsr   r   ImportErrorr   r   r   r   r   r   r   r   r   r    r/   runner
startswithUNITTESTNOSE2PYTESTr8   setrA   rE   rR   rl   r`   objectrb   ro   r   r   r   r   r   r   r   r   r   r   r   r   r   r$  r+  r0  r8  r=  rB  rF  rP  rR  rc  rj  rl  rangecases_over_10ro  rs  r  r  r  version_infomajorminorr  r  )is   0r   <module>r     s    
   66  A
& 
Z(	7	
H
  
  7, 

	&M	&b |   {H HM M JF J. KO8 O OD K7& 7 74X 4n	@V 	@ |6  xJ   T.
8 
 /
. |@  xTdllC D "J "JJ=_x =_@	>>"
	> (  $%E &E>Q"G G ""qb!MFUBK3H#IJ
E!Hzl#a:,'aj-89eA1o
VeQZ4H'IJ
EGhZ 
E!Hxj!qHh#78q!x&:;q!Q)LMqA8(<=qA8fsAh=O(PQq!Q!,x=SY\_ab[cRd.ef "##"#   33  		
 $)9-9aQqS9-}$ $ _' 1X 1	1> W		 [\
( 
	\
 
BK
L;r: 
' '
'T6  Q3#3#3#9#9Q#>0?>U ? $?q  6566J .s   O O,O)(O)