o
    ϯij]                     @   s  d dl Z d dlZd dlZd dlmZ d dlmZ z
d dlmZm	Z	 W n e
y3   dd Zdd Z	Y nw d	d
lmZmZmZmZmZmZmZmZmZ dd Zdd Ze ZedZedkZedkZeeeogeedZe ZdddZdd ZddddededddgZ edg d  ee dd!d"Z!G d#d$ d$e"Z#esG d%d& d&e"Z$d'd( Z%e&d)G d*d+ d+eZ'e&d)G d,d- d-e"Z(G d.d/ d/eZ)G d0d1 d1e"Z*edd2g edge&d3d4d5 Z+ej&j,d6ej-d7G d8d9 d9eZ.edd:g edgej&j,d6ej-ej-d;d<d= Z/G d>d? d?eZ0G d@dA dAeZ1dBdC Z2dDdE Z3dFdG Z4dHdI Z5edJdKg edLdM dNdO Z6dPdQ Z7dRdS Z8dTdU Z9G dVdW dWZ:edXe g fdYe g fdYed	ddZd[d\d]difgfd]ed	d^gfd_ed	d^gfd_ed	d`d^dagfdbed	d`dd^d\dcd`ifgfdde degfdded	dfgfdged	dfdhgfdged	didfdjgfdged	didkg dlfdged	didmdfdjgfdged	didndfdhd\dodiifgfdged	didkdkdndfdjdpd\dodkifgfgdqdr Z;eg dsddudvZ<edZgdwdx Z=dydz e>d{D Z?ee?d|d} Z@ed~ddgG dd deZAedddgddM dG dd deZBed]didcdiddddgG dd deZCG dd de"ZDejEjFdkkrsejEjGdkrud dlmHZH G dd deHZIdS dS dS )    Nwraps)TestCase)assert_equalassert_raisesc                  O      t  j| i |S N)r   assertEqualargskwds r   F/home/ubuntu/.local/lib/python3.10/site-packages/parameterized/test.pyr         r   c                  O   r   r   )r   assertRaisesr
   r   r   r   r      r   r      )	PY3PY2parameterizedparam"parameterized_argument_value_pairs
short_reprdetect_runnerparameterized_classSkipTestc                 C   s   || vrt d|| f d S )Nz%r not in %r)AssertionError)haystackneedler   r   r   assert_contains   s   r   c                    s    fdd}|S )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                    s   t   fdd}|S )Nc                    sH   |    | g|R i | W d    d S 1 sw   Y  d S r   )assertRaisesRegexp)selfr   kwargs)expected_exceptionexpected_regexpfuncr   r   wrapper$   s   "zGassert_raises_regexp_decorator.<locals>.func_decorator.<locals>.wrapperr   )r$   r%   r"   r#   r$   r   func_decorator#   s   z6assert_raises_regexp_decorator.<locals>.func_decoratorr   )r"   r#   r(   r   r&   r   assert_raises_regexp_decorator   s   r)   unittestnose2pytest)	generator
standalonepy2nose2r,   c                 C   s<   |d u r| }d } t dd | pd D rd S t| d S )Nc                 s   s    | ]}t |V  qd S r   )
SKIP_FLAGSget).0fr   r   r   	<genexpr>C   s    zexpect.<locals>.<genexpr> )anysplitmissing_testsupdate)skiptestsr   r   r   expect?   s   r<   c                 C   sT   t | ts| g} t||}t jj}| D ]}||v r'|| }||}|||< qdS )a^  
    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)r;   r"   r#   	decoratorframe_localstesttest_methoddecorated_test_methodr   r   r   expect_exception_matching_regexH   s   

rH   *   foo0s   bar{   foo1foo2rJ   )barr.   )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                 C   s   t d| |f  d S )Nztest_naked_function(%r, bar=%r)r8   remove)foorO   r   r   r   test_naked_functiono      rS   c                   @   s,   e Zd Zedg d eedddZdS )TestParameterizedr-   )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                 C      t d||f  d S )Nz test_instance_method(%r, bar=%r)rP   r    rR   rO   r   r   r   test_instance_method~   rT   z&TestParameterized.test_instance_methodr   )__name__
__module____qualname__r<   r   test_paramsrX   r   r   r   r   rU   t   s    	rU   c                   @   sJ   e Zd Zedg d g dZdZdd Zdd Zed	d
gdd Z	dS )TestSetupTeardownr-   )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                 C   s   | j d| _d S )Nr   )stackpopactual_orderr    r   r   r   setUp   r   zTestSetupTeardown.setUpc                 C   s   t d| jdf  d S )Nzteardown_called(%s)r   )r8   rQ   r^   r_   ra   r   r   r   tearDown   s   zTestSetupTeardown.tearDownr      c                 G   s(   t | jd|f  td| jf  d S )Nzsetup %sztest_setup(%s))r   r`   r8   rQ   )r    countar   r   r   
test_setup   s   zTestSetupTeardown.test_setupN)
rY   rZ   r[   r<   r^   r`   rb   rc   r   ri   r   r   r   r   r]      s    
r]   c                    s    fdd}|S )Nc                    s"   |j d }| jd   t| S )Nr   z	_%s_name_)r   rY   r   to_safe_name)testcase_func	param_numr   arg
custom_tagr   r   custom_naming_func   s   
z.custom_naming_func.<locals>.custom_naming_funcr   )ro   rp   r   rn   r   rp      s   rp   z	os.getpidc                   @   s|   e Zd Zeg d eddedgeddd Z	eg d ed	d
eddgededdd Z
dS ),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')rI   rK   rM   os.umaskc                 C      t d||j|jf  d S )Nz-test_one_function_patch_decorator(%r, %r, %r)r8   rQ   
_mock_name)r    rR   
mock_umaskmock_getpidr   r   r   !test_one_function_patch_decorator   s
   
zNTestParameterizedExpandWithMockPatchForClass.test_one_function_patch_decorator)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')rJ   3   rK   bar0bar1	os.fdopenc                 C   s"   t d|||j|j|jf  d S )Nz:test_multiple_function_patch_decorator(%r, %r, %r, %r, %r)rt   )r    rR   rO   rv   mock_fdopenrw   r   r   r   &test_multiple_function_patch_decorator   s
   
zSTestParameterizedExpandWithMockPatchForClass.test_multiple_function_patch_decoratorN)rY   rZ   r[   r<   r   expandr   mockpatchrx   r   r   r   r   r   rq      s    	rq   c                   @   4   e Zd Zeddg edgeddd ZdS )#TestParameterizedExpandWithNoExpandr-   z5test_patch_class_no_expand(42, 51, 'umask', 'getpid')ry   rr   c                 C      t d|||j|jf  d S )Nz*test_patch_class_no_expand(%r, %r, %r, %r)rt   )r    rR   rO   rv   rw   r   r   r   test_patch_class_no_expand   s
   
z>TestParameterizedExpandWithNoExpand.test_patch_class_no_expandN)rY   rZ   r[   r<   r   r   r   r   r   r   r   r   r      s    r   c                   @   s   e Zd Zeg d eddedgeddd Z	eg d ed	d
eddgededdd Z
eddg eddgeddd Zeddgedd dS ).TestParameterizedExpandWithNoMockPatchForClass)z2test_one_function_patch_decorator('foo1', 'umask')z2test_one_function_patch_decorator('foo0', 'umask')z.test_one_function_patch_decorator(42, 'umask')rI   rK   rM   rr   c                 C      t d||jf  d S )Nz)test_one_function_patch_decorator(%r, %r)rt   r    rR   rv   r   r   r   rx      s   
zPTestParameterizedExpandWithNoMockPatchForClass.test_one_function_patch_decorator)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')ry   r{   r}   r~   c                 C   r   )Nz6test_multiple_function_patch_decorator(%r, %r, %r, %r)rt   )r    rR   rO   rv   r   r   r   r   r      s
   
zUTestParameterizedExpandWithNoMockPatchForClass.test_multiple_function_patch_decoratorz>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                 C   s   t d||j td)Nz5test_patch_decorator_over_test_with_error({!r}, {!r})z"This error should have been caught)r8   rQ   formatru   
ValueErrorr   r   r   r   )test_patch_decorator_over_test_with_error   s   zXTestParameterizedExpandWithNoMockPatchForClass.test_patch_decorator_over_test_with_error4test_patch_decorator_over_test_with_error_0_foo_this4test_patch_decorator_over_test_with_error_1_foo_thatz$^This error should have been caught$)r;   r"   r#   N)rY   rZ   r[   r<   r   r   r   r   r   rx   r   r   rH   r   r   r   r   r   r      s6    
r   c                   @   r   )6TestParameterizedExpandWithNoMockPatchForClassNoExpandr-   z%test_patch_no_expand(42, 51, 'umask')ry   rr   c                 C   s   t d|||jf  d S )Nz test_patch_no_expand(%r, %r, %r)rt   )r    rR   rO   rv   r   r   r   test_patch_no_expand  s   

zKTestParameterizedExpandWithNoMockPatchForClassNoExpand.test_patch_no_expandN)rY   rZ   r[   r<   r   r   r   r   r   r   r   r   r     s    r   z0test_mock_patch_standalone_function(42, 'umask')rr   c                 C   s   t d| |jf  d S )Nz+test_mock_patch_standalone_function(%r, %r)rt   )rR   rv   r   r   r   #test_mock_patch_standalone_function  s
   r   os)umaskc                   @   sR   e Zd Zeddg edgejjdej	ddd Z
edgd	d
 ZdS ),TestParameterizedExpandWithMockPatchMultiplez@test_mock_patch_multiple_expand_on_method(42, 'umask', 'getpid')z5test_mock_patch_multiple_expand_on_class(16, 'umask')rI   r   )getpidc                 C   rs   )Nz5test_mock_patch_multiple_expand_on_method(%r, %r, %r)rt   )r    r   r   r   r   r   r   )test_mock_patch_multiple_expand_on_method-  
   
zVTestParameterizedExpandWithMockPatchMultiple.test_mock_patch_multiple_expand_on_method)   c                 C   r   )Nz0test_mock_patch_multiple_expand_on_class(%r, %r)rt   )r    r   r   r   r   r   (test_mock_patch_multiple_expand_on_class6  s
   zUTestParameterizedExpandWithMockPatchMultiple.test_mock_patch_multiple_expand_on_classN)rY   rZ   r[   r<   r   r   r   r   multipleDEFAULTr   r   r   r   r   r   r   &  s    

r   z:test_mock_patch_multiple_standalone(42, 'umask', 'getpid'))r   r   c                 C   s   t d| |j|jf  d S )Nz/test_mock_patch_multiple_standalone(%r, %r, %r)rt   )r   r   r   r   r   r   #test_mock_patch_multiple_standaloneB  r   r   c                   @   sT   e Zd Zeg d eed
ddZeg d ejeeddd
dd	Z	dS )TestParamerizedOnTestCase)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                 C   rV   )Nztest_on_TestCase(%r, bar=%r)rP   rW   r   r   r   test_on_TestCaseW  rT   z*TestParamerizedOnTestCase.test_on_TestCase)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                 C   sb   t  }|d }|d j}|d d j}dt| }t||d||f  td|||f  d S )Nr   r   rh   test_on_TestCase2_custom_name_z>Test Method name '%s' did not get customized to expected: '%s'z%s(%r, bar=%r))	r?   r^   rB   _testMethodNamer   rj   r   r8   rQ   )r    rR   rO   r^   framerD   nose_test_method_nameexpected_namer   r   r   test_on_TestCase2d  s   
z+TestParamerizedOnTestCase.test_on_TestCase2r   )
rY   rZ   r[   r<   r   r   r\   r   rp   r   r   r   r   r   r   M  s    		r   c                   @   s   e Zd ZdddZejedgdd ddd	d
Zeedgdd Zeedgdd Z	eedgdd Z
eedgdd ZeedgdddZeedgdddZdS ) TestParameterizedExpandDocstringFc                 C   sr   t  }|d d j}|dp |dp |dp |dp d}|du r)td|j}|r2| }t|| dS )	zg Checks 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)r?   r^   rB   r1   r   __doc__rstripr   )r    expected_docstringr   r^   rB   rF   actual_docstringr   r   r   _assert_docstrings  s"   
z2TestParameterizedExpandDocstring._assert_docstringrR   c                 C      dS )Nstuffr   )r3   npr   r   r   <lambda>      z)TestParameterizedExpandDocstring.<lambda>)doc_funcNc                 C   s   |  d dS )Documentationr   Nr   rW   r   r   r   test_custom_doc_func  s   z5TestParameterizedExpandDocstring.test_custom_doc_funcc                 C      |  d|f  dS )zDocumentation.zDocumentation [with foo=%r].Nr   r    rR   r   r   r   test_single_line_docstring     z;TestParameterizedExpandDocstring.test_single_line_docstringc                 C   r   )r5   z[with foo=%r]Nr   r   r   r   r   test_empty_docstring  r   z5TestParameterizedExpandDocstring.test_empty_docstringc                 C   r   )zDocumentation.

        Morez*Documentation [with foo=%r].

        MoreNr   r   r   r   r   test_multiline_documentation  s
   z=TestParameterizedExpandDocstring.test_multiline_documentationc                 C   r   )u   Döcumentation.u   Döcumentation [with foo=%r].Nr   r   r   r   r   test_unicode_docstring  r   z7TestParameterizedExpandDocstring.test_unicode_docstring   c                 C   s   |  d||f  dS )r   #Documentation [with foo=%r, bar=%r]Nr   rW   r   r   r   %test_default_values_get_correct_value  s   zFTestParameterizedExpandDocstring.test_default_values_get_correct_valuec                 C   s   | j d||f dd dS )z
        Documentation
        r   T)r   Nr   rW   r   r   r   test_with_leading_newline  s   z:TestParameterizedExpandDocstring.test_with_leading_newline)Fr   )r   )rY   rZ   r[   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  s$    



	
r   c               
   C   P   zG dd dt } W td ty' } ztt|d W Y d }~d S d }~ww )Nc                   @      e Zd Zedgdd ZdS )zctest_warns_when_using_parameterized_with_TestCase.<locals>.TestTestCaseWarnsOnBadUseOfParameterizedrI   c                 S      d S r   r   r   r   r   r   test_in_subclass_of_TestCase     ztest_warns_when_using_parameterized_with_TestCase.<locals>.TestTestCaseWarnsOnBadUseOfParameterized.test_in_subclass_of_TestCaseN)rY   rZ   r[   r   r   r   r   r   r   (TestTestCaseWarnsOnBadUseOfParameterized      r   parameterized.expandExpected exception not raised)r   	Exceptionr   strr   )r   er   r   r   1test_warns_when_using_parameterized_with_TestCase     r   c               
   C   sP   zt g dd  W td ty' }  ztt| d W Y d } ~ d S d } ~ ww )Nc                   S   r   r   r   r   r   r   r   r     r   z<test_helpful_error_on_empty_iterable_input.<locals>.<lambda>iterable is emptyr   )r   r   r   r   r   r   r   r   r   *test_helpful_error_on_empty_iterable_input  s   r   c                  C   s"   t g dddd } tt|  d S )NT)skip_on_emptyc                   S   r   r   r   r   r   r   r   r     r   z2test_skip_test_on_empty_iterable.<locals>.<lambda>)r   r   r   r'   r   r   r    test_skip_test_on_empty_iterable  s   r   c               
   C   r   )Nc                   @   s   e Zd Zeg dd ZdS )zRtest_helpful_error_on_empty_iterable_input_expand.<locals>.ExpectErrorOnEmptyInputc                 S   r   r   r   ra   r   r   r   test_expect_error  r   zdtest_helpful_error_on_empty_iterable_input_expand.<locals>.ExpectErrorOnEmptyInput.test_expect_errorN)rY   rZ   r[   r   r   r   r   r   r   r   ExpectErrorOnEmptyInput  r   r   r   r   )r   r   r   r   r   )r   r   r   r   r   1test_helpful_error_on_empty_iterable_input_expand  r   r   zstadalone generatorz"test_wrapped_iterable_input('foo')c                   C   s
   t dgS )NrR   )iterr   r   r   r   r     s   
 r   c                 C   s   t d| f  d S )Nztest_wrapped_iterable_input(%r)rP   rR   r   r   r   test_wrapped_iterable_input     r   c               
   C   sT   zt dd dd  W td ty) }  ztt| d W Y d } ~ d S d } ~ ww )Nc                   S   r   )NrJ   r   r   r   r   r   r     r   z:test_helpful_error_on_non_iterable_input.<locals>.<lambda>c                   S   r   r   r   r   r   r   r   r     r   zis not iterabler   )r   r   r   r   r   r   r   r   r   (test_helpful_error_on_non_iterable_input  s   r   c                  C   s   t tt} t| g  d S r   )sortedr>   r8   r   )missingr   r   r   tearDownModule  s   r   c               
   C   s   t rtdG dd d} zt|    W td tyA } ztt|d tt|d tt|d W Y d }~d S d }~ww )Nz"Py3 doesn't have old-style classesc                   @   r   )z-test_old_style_classes.<locals>.OldStyleClassrR   c                 S   r   r   r   r    r   r   r   r   parameterized_method  r   zBtest_old_style_classes.<locals>.OldStyleClass.parameterized_methodN)rY   rZ   r[   r   r   r   r   r   r   OldStyleClass  r   r   z	new-styler   z0expected TypeError not raised by old-style class)r   r   r>   r   	TypeErrorr   r   r   )r   r   r   r   r   test_old_style_classes  s   r   c                   @   s0   e Zd Zedddg eddgdd ZdS )	TestOldStyleClasszpy2nose2 generatorztest_on_old_style_class('foo')ztest_on_old_style_class('bar')rR   rO   c                 C   s   t d|f  d S )Nztest_on_old_style_class(%r)rP   r   r   r   r   r     r   z(TestOldStyleClass.test_old_style_classesN)rY   rZ   r[   r<   r   r   r   r   r   r   r   r     s    r   r5   z*a, **kwr   )*ard   z**kwrR   )rR   r   zfoo, *a	   )r   )r   zfoo, *a, **kwrO   zx=9)xr   r   r   zx, y=9, *a, **kw)yr   rf   r   rf   r   )r   r   r   )r   )r   )zr   r   c                 C   s&   t d| f }t||}t|| d S )Nzlambda %s: None)evalr   r   )func_paramsr   expectedhelperactualr   r   r   'test_parameterized_argument_value_pairs  s   
r   ))abcdz'abcd')	123456789z	'12...89')[z	123...789)r   z12...89      c                 C   s   t t| |d| d S )N)r   )r   r   )inputr   r   r   r   r   test_short_repr  s   r  c                 C   r   )z Docstring! Nr   )r  r   r   r   test_with_docstring'  s   r  c                 C   s   g | ]}||d  fqS rd   r   )r2   ir   r   r   
<listcomp>/  s    r     c                 C   s   t | |d  d S )Nr   )r   )r  r   r   r   r   test_cases_over_101  s   r  )rh   bc)rR   r   rf   )r   r   rf   c                   @   s8   e Zd Zeg d dd Zdd Zdd Zdd	 Zd
S )TestParameterizedClass)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                 C   sF   t | dsJ t| j| j d td| jj|| j| j| jf  d S )Nrh   r   z%s:%s(%r, %r, %r))	hasattrr   r  r	  r8   rQ   	__class__rY   rh   )r    	test_namer   r   r   _assertionsD  s   z"TestParameterizedClass._assertionsc                 C      |  d d S )Ntest_method_ar  ra   r   r   r   r  O     z$TestParameterizedClass.test_method_ac                 C   r  )Ntest_method_br  ra   r   r   r   r  R  r  z$TestParameterizedClass.test_method_bc                 C   r  )NtestCamelCaseMethodCr  ra   r   r   r   r  U  r  z+TestParameterizedClass.testCamelCaseMethodCN)rY   rZ   r[   r<   r  r  r  r  r   r   r   r   r
  6  s    	r
  )rh   rd   re   c                 C   s   d| j |d f S )Nz%s_custom_func_%srh   )rY   )clsidxattrsr   r   r   r   \  s    )class_name_funcc                   @   s    e Zd Zeddg dd ZdS )TestNamedParameterizedClassz8TestNamedParameterizedClass_custom_func_1:test_method(1)z8TestNamedParameterizedClass_custom_func_2:test_method(2)c                 C   s   t d| jj| jf  d S )Nz%s:test_method(%r))r8   rQ   r  rY   rh   ra   r   r   r   rF   c  s   z'TestNamedParameterizedClass.test_methodN)rY   rZ   r[   r<   rF   r   r   r   r   r  Y  s    r  z
some stuffzother stuffz	some namer   )rO   namerR   c                       sD   e Zd Zeg d dZdZ fddZ fddZdd	 Z  Z	S )
TestParameterizedClassDict)	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                    .   t t|   td| jj| j| jf  d S )Nz%s:setUp(%r, %r))	superr  rb   r8   rQ   r  rY   rR   rO   ra   r  r   r   rb        z TestParameterizedClassDict.setUpc                    r  )Nz%s:tearDown(%r, %r))	r  r  rc   r8   rQ   r  rY   rR   rO   ra   r  r   r   rc     r   z#TestParameterizedClassDict.tearDownc                 C   s    t d| jj| j| jf  d S )Nz%s:test_method(%r, %r))r8   rQ   r  rY   rR   rO   ra   r   r   r   rF     s
   z&TestParameterizedClassDict.test_method)
rY   rZ   r[   r<   rR   rO   rb   rc   rF   __classcell__r   r   r  r   r  j  s    		r  c                   @   s"   e Zd Zeddgdd ZdS )TestUnicodeDocstringvalue1u
   vålüé¡c                 C   r   )uL    Это док-стринг, содержащий не-ascii символы Nr   r   r   r   r   r    s   z(TestUnicodeDocstring.test_with_docstringN)rY   rZ   r[   r   r   r  r   r   r   r   r"    s    r"     )IsolatedAsyncioTestCasec                   @   sZ   e Zd Zeg d eddedgdd Zeddedge	ddd	 Z
d
S )3TestAsyncParameterizedExpandWithNoMockPatchForClass)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')rI   rK   rM   c                    s   t d|f  d S )Nztest_one_async_function(%r)rP   r   r   r   r   test_one_async_function  s   zKTestAsyncParameterizedExpandWithNoMockPatchForClass.test_one_async_functionrr   c                    s   t d||jf  d S )Nz/test_one_async_function_patch_decorator(%r, %r)rt   r   r   r   r   'test_one_async_function_patch_decorator  s   
z[TestAsyncParameterizedExpandWithNoMockPatchForClass.test_one_async_function_patch_decoratorN)rY   rZ   r[   r<   r   r   r   r'  r   r   r(  r   r   r   r   r&    s    	
r&  r   )r   )Jr?   sysr   	functoolsr   r*   r   
nose.toolsr   r   ImportErrorr   r   r   r   r   r   r   r   r   r   r)   runner
startswithUNITTESTNOSE2PYTESTr0   setr8   r<   rH   r\   rS   objectrU   r]   rp   r   rq   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r  rangecases_over_10r  r
  r  r  r"  version_infomajorminorr%  r&  r   r   r   r   <module>   s   ,
	
	
		"7	%@

	

$




*	