Sindbad~EG File Manager

Current Path : /usr/local/lib/python3.9/unittest/test/__pycache__/
Upload File :
Current File : //usr/local/lib/python3.9/unittest/test/__pycache__/test_skipping.cpython-39.opt-1.pyc

a

��gpN�@s:ddlZddlmZGdd�dej�Zedkr6e��dS)�N��
LoggingResultc@s�eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd �Zd!d"�Zd#d$�Zd%d&�Zd'd(�Zd)d*�Zd+d,�Zd-d.�Zd/d0�Zd1d2�Zd3S)4�Test_TestSkippingcsNG�fdd�dtj�}g�t��}|d�}|�|�|�|�|��gd��|�|j|dfg�g�|��}|��gd��|�|j|dfg�|�|jd�G�fdd�dtj�}g�t��}|d	�}|�|�|�|�|��gd��|�|j|d
fg�|�|jd�g�|��}|��gd��|�|j|d
fg�|�|jd�dS)Ncs eZdZ�fdd�Zdd�ZdS)�,Test_TestSkipping.test_skipping.<locals>.Foocst��S�Nr��self��events��7/usr/local/lib/python3.9/unittest/test/test_skipping.py�defaultTestResult
s�>Test_TestSkipping.test_skipping.<locals>.Foo.defaultTestResultcSs|�d�dS�N�skip��skipTestrrrr�test_skip_mesz9Test_TestSkipping.test_skipping.<locals>.Foo.test_skip_meN��__name__�
__module__�__qualname__r
rrr	rr�Foo	srr��	startTest�addSkip�stopTestr��startTestRunrrr�stopTestRun�cs(eZdZ�fdd�Zdd�Zdd�ZdS)rcst��Srrrr	rrr
srcSs|�d�dS)N�testingrrrrr�setUp sz2Test_TestSkipping.test_skipping.<locals>.Foo.setUpcSsdSrrrrrr�test_nothing"�z9Test_TestSkipping.test_skipping.<locals>.Foo.test_nothingN)rrrr
r"r#rr	rrrsr#r!)�unittest�TestCaser�assertIs�run�assertEqual�skipped�testsRun)rr�result�testrr	r�
test_skippings2zTest_TestSkipping.test_skippingcsG�fdd�dtj�}g�t��}|d�}|�|�|�|�|��gd��|�t|j�d�|jd\}}|�|d�|�|tj�|�	||�|jd\}}|�|d	�|�|tj�|�	||�|�|jd
|df�g�|��}|��gd��|�d
d�|jD�gd��dS)Ncs eZdZ�fdd�Zdd�ZdS)z5Test_TestSkipping.test_skipping_subtests.<locals>.Foocst��Srrrr	rrr
4szGTest_TestSkipping.test_skipping_subtests.<locals>.Foo.defaultTestResultc	Ssz|jdd��P|jdd��|�d�Wd�n1s:0Y|�d�Wd�n1sb0Y|�d�dS)Nr ��a�)�b�skip 1�skip 2�skip 3)�subTestrrrrrr6s
((zBTest_TestSkipping.test_skipping_subtests.<locals>.Foo.test_skip_meNrrr	rrr3srr)rrrrr�rr3r r4r1r5)rrrrrrrcSsg|]\}}|�qSrr)�.0�subtest�msgrrr�
<listcomp>Rr$z<Test_TestSkipping.test_skipping_subtests.<locals>.<listcomp>)r3r4r5)
r%r&rr'r(r)�lenr*ZassertIsInstanceZassertIsNot)rrr,r-r9r:rr	r�test_skipping_subtests2s0	��z(Test_TestSkipping.test_skipping_subtestscs6tjddftjddff}|D�]\���G����fdd�dtj�}|d�}|d�}t�||g�}g�t��}|�|�|�|�|�t	|j
�d�gd�}|��|�|�|jd	�|�|j
|d
fg�|�|�
��g�|��}|��gd��|�|j
|d
fg�g�|��}|��gd��|�|j
g�qdS)
NFTcs<eZdZ�fdd�Z��d�dd��Z��d�dd��ZdS)	z7Test_TestSkipping.test_skipping_decorators.<locals>.Foocst��Srrrr	rrr
ZszITest_TestSkipping.test_skipping_decorators.<locals>.Foo.defaultTestResultr!cSsdSrrrrrr�	test_skip]szATest_TestSkipping.test_skipping_decorators.<locals>.Foo.test_skipcSsdSrrrrrr�test_dont_skip`szFTest_TestSkipping.test_skipping_decorators.<locals>.Foo.test_dont_skipN)rrrr
r>r?r�ZdecoZdo_skipZ	dont_skipr
rrrYs

rr>r?r )rrrr�
addSuccessrr1r!r)rrrArr)r%Z
skipUnlessZskipIfr&�	TestSuiterr'r(r)r<r*r+�
assertTrue�
wasSuccessful)rZop_tablerZtest_do_skipr?�suiter,Zexpectedrr@r�test_skipping_decoratorsUs2

�	z*Test_TestSkipping.test_skipping_decoratorscs�t�d�G��fdd�dtj��}g�g�t��}|d�}t�|g�}|�|�|�|�|��gd��|�|j|dfg�|��g�g�|��}|��gd��|�|j|dfg�|��g�dS)Nr!cs$eZdZ�fdd�Z�fdd�ZdS)z.Test_TestSkipping.test_skip_class.<locals>.Foocst��Srrrr	rrr
�sz@Test_TestSkipping.test_skip_class.<locals>.Foo.defaultTestResultcs��d�dS�Nr ��appendr��recordrr�test_1�sz5Test_TestSkipping.test_skip_class.<locals>.Foo.test_1N)rrrr
rLr�r
rKrrr~srrLrr)	r%rr&rrBr'r(r)r*�rrr,r-rErrMr�test_skip_class}s z!Test_TestSkipping.test_skip_classcs�t�d�G�fdd�d��}Gdd�d|tj�}g�t��}|d�}t�|g�}|�|�|�|�|�|j|dfg�|��g�dS)Nr!cseZdZ�fdd�ZdS)z=Test_TestSkipping.test_skip_non_unittest_class.<locals>.Mixincs��d�dSrGrHrrJrrrL�szDTest_TestSkipping.test_skip_non_unittest_class.<locals>.Mixin.test_1N�rrrrLrrJrr�Mixin�srQc@seZdZdS)z;Test_TestSkipping.test_skip_non_unittest_class.<locals>.FooN�rrrrrrrr�srrL)	r%rr&�
TestResultrBr'r(r)r*)rrQrr,r-rErrJr�test_skip_non_unittest_class�sz.Test_TestSkipping.test_skip_non_unittest_classcCs`Gdd�dtj�}g}t|�}|d�}|�|�|�|�|�|gd��|�|j|dfg�dS)Nc@seZdZdd�Zdd�ZdS)z1Test_TestSkipping.test_skip_in_setup.<locals>.FoocSs|�d�dSrrrrrrr"�sz7Test_TestSkipping.test_skip_in_setup.<locals>.Foo.setUpcSs|�d�dS)N�shouldn't come here��failrrrrr�sz>Test_TestSkipping.test_skip_in_setup.<locals>.Foo.test_skip_meN)rrrr"rrrrrr�srrrr�r%r&rr'r(r)r*�rrr
r,r-rrr�test_skip_in_setup�sz$Test_TestSkipping.test_skip_in_setupcCs`Gdd�dtj�}g}t|�}|d�}|�|�|�|�|�|gd��|�|j|dfg�dS)Nc@seZdZdd�Zdd�ZdS)z3Test_TestSkipping.test_skip_in_cleanup.<locals>.FoocSsdSrrrrrrr�sz@Test_TestSkipping.test_skip_in_cleanup.<locals>.Foo.test_skip_mecSs|�d�dSrrrrrr�tearDown�sz<Test_TestSkipping.test_skip_in_cleanup.<locals>.Foo.tearDownN�rrrrr[rrrrr�srrrrrXrYrrr�test_skip_in_cleanup�sz&Test_TestSkipping.test_skip_in_cleanupcCs`Gdd�dtj�}g}t|�}|d�}|�|�|�|�|�|gd��|�|j|dfg�dS)Nc@seZdZdd�Zdd�ZdS)z?Test_TestSkipping.test_failure_and_skip_in_cleanup.<locals>.FoocSs|�d�dS�NrWrVrrrrr�szLTest_TestSkipping.test_failure_and_skip_in_cleanup.<locals>.Foo.test_skip_mecSs|�d�dSrrrrrrr[�szHTest_TestSkipping.test_failure_and_skip_in_cleanup.<locals>.Foo.tearDownNr\rrrrr�srr�rr�
addFailurerrrXrYrrr� test_failure_and_skip_in_cleanup�sz2Test_TestSkipping.test_failure_and_skip_in_cleanupcCs`Gdd�dtj�}g}t|�}|d�}|�|�|�|�|�|gd��|�|j|dfg�dS)Nc@seZdZdd�Zdd�ZdS)z@Test_TestSkipping.test_skipping_and_fail_in_cleanup.<locals>.FoocSs|�d�dSrrrrrrr�szMTest_TestSkipping.test_skipping_and_fail_in_cleanup.<locals>.Foo.test_skip_mecSs|�d�dSr^rVrrrrr[�szITest_TestSkipping.test_skipping_and_fail_in_cleanup.<locals>.Foo.tearDownNr\rrrrr�srrr_rrXrYrrr�!test_skipping_and_fail_in_cleanup�sz3Test_TestSkipping.test_skipping_and_fail_in_cleanupcCs�Gdd�dtj�}g}t|�}|d�}|�|�|�|�|�|gd��|�|j�|�|jdd|�|�|j	�|�
|���dS)Nc@seZdZejdd��ZdS)z4Test_TestSkipping.test_expected_failure.<locals>.FoocSs|�d�dS�N�help me!rVrrrr�test_die�sz=Test_TestSkipping.test_expected_failure.<locals>.Foo.test_dieN�rrrr%�expectedFailurererrrrr�srre�r�addExpectedFailurerr)r%r&rr'r(r)�assertFalse�failures�expectedFailures�unexpectedSuccessesrCrDrYrrr�test_expected_failure�s�z'Test_TestSkipping.test_expected_failurecCs�tjGdd�dtj��}g}t|�}|d�}|�|�|�|�|�|gd��|�|j�|�|j	dd|�|�|j
�|�|���dS)Nc@seZdZdd�ZdS)zGTest_TestSkipping.test_expected_failure_with_wrapped_class.<locals>.FoocSs|�d�dS�NF�rCrrrrrL�szNTest_TestSkipping.test_expected_failure_with_wrapped_class.<locals>.Foo.test_1NrPrrrrr�srrLrhr)
r%rgr&rr'r(r)rjrkrlrmrCrDrYrrr�(test_expected_failure_with_wrapped_class�s�z:Test_TestSkipping.test_expected_failure_with_wrapped_classcCs�Gdd�dtj�}tjGdd�d|��}g}t|�}|d�}|�|�|�|�|�|gd��|�|j�|�|j	dd|�|�|j
�|�|���dS)Nc@seZdZdd�ZdS)zJTest_TestSkipping.test_expected_failure_with_wrapped_subclass.<locals>.FoocSs|�d�dSrorprrrrrL�szQTest_TestSkipping.test_expected_failure_with_wrapped_subclass.<locals>.Foo.test_1NrPrrrrr�src@seZdZdS)zJTest_TestSkipping.test_expected_failure_with_wrapped_subclass.<locals>.BarNrRrrrr�Bar�srrrLrhr)
r%r&rgrr'r(r)rjrkrlrmrCrD)rrrrr
r,r-rrr�+test_expected_failure_with_wrapped_subclass�s�z=Test_TestSkipping.test_expected_failure_with_wrapped_subclasscCs�Gdd�dtj�}g}t|�}|d�}|�|�|�|�|�|gd��|�|j�|�t|j	�d�|�|j	dd|�|�|j
�|�|���dS)Nc@seZdZejdd��ZdS)z=Test_TestSkipping.test_expected_failure_subtests.<locals>.FoocSs�|���Wd�n1s0Y|���|�d�Wd�n1sP0Y|���|�d�Wd�n1s�0YdS)NrdrU)r6rWrrrrres

(
zFTest_TestSkipping.test_expected_failure_subtests.<locals>.Foo.test_dieNrfrrrrrsrre)r�addSubTestSuccessrirr r)
r%r&rr'r(r)rjrkr<rlrmrCrDrYrrr�test_expected_failure_subtests
s�z0Test_TestSkipping.test_expected_failure_subtestscCs�Gdd�dtj�}g}t|�}|d�}|�|�|�|�|�|gd��|�t|j�d�|�d|jdd�|�	|j
�|�	|j�|�	|���dS)Nc@s"eZdZejdd��Zdd�ZdS)zHTest_TestSkipping.test_expected_failure_and_fail_in_cleanup.<locals>.FoocSs|�d�dSrcrVrrrrre*szQTest_TestSkipping.test_expected_failure_and_fail_in_cleanup.<locals>.Foo.test_diecSs|�d�dS�Nzbad tearDownrVrrrrr[-szQTest_TestSkipping.test_expected_failure_and_fail_in_cleanup.<locals>.Foo.tearDownN�rrrr%rgrer[rrrrr)s
rre�rr`rr �AssertionError: bad tearDownr�
r%r&rr'r(r)r<rk�assertInrjrlrmrDrYrrr�)test_expected_failure_and_fail_in_cleanup(s�z;Test_TestSkipping.test_expected_failure_and_fail_in_cleanupcCs�Gdd�dtj�}g}t|�}|d�}|�|�|�|�|�|gd��|�|j�|�|j�|�|j	�|�|j
|dfg�|�|���dS)Nc@s"eZdZejdd��Zdd�ZdS)zHTest_TestSkipping.test_expected_failure_and_skip_in_cleanup.<locals>.FoocSs|�d�dSrcrVrrrrre=szQTest_TestSkipping.test_expected_failure_and_skip_in_cleanup.<locals>.Foo.test_diecSs|�d�dSrrrrrrr[@szQTest_TestSkipping.test_expected_failure_and_skip_in_cleanup.<locals>.Foo.tearDownNrwrrrrr<s
rrerr�
r%r&rr'r(r)rjrkrlrmr*rCrDrYrrr�)test_expected_failure_and_skip_in_cleanup;s�z;Test_TestSkipping.test_expected_failure_and_skip_in_cleanupcCs�Gdd�dtj�}g}t|�}|d�}|�|�|�|�|�|gd��|�|j�|�|j�|�|j	|g�|�|�
��dS)Nc@seZdZejdd��ZdS)z6Test_TestSkipping.test_unexpected_success.<locals>.FoocSsdSrrrrrrrePsz?Test_TestSkipping.test_unexpected_success.<locals>.Foo.test_dieNrfrrrrrOsrre)r�addUnexpectedSuccessr�r%r&rr'r(r)rjrkrlrmrDrYrrr�test_unexpected_successNs�z)Test_TestSkipping.test_unexpected_successcCs�Gdd�dtj�}g}t|�}|d�}|�|�|�|�|�|gd��|�|j�|�|j�|�|j	|g�|�|�
��dS)Nc@seZdZejdd��ZdS)z?Test_TestSkipping.test_unexpected_success_subtests.<locals>.FoocSsT|���Wd�n1s0Y|���Wd�n1sF0YdSr)r6rrrrrebs

zHTest_TestSkipping.test_unexpected_success_subtests.<locals>.Foo.test_dieNrfrrrrrasrre)rrtrtrrr�rYrrr� test_unexpected_success_subtests^s	�z2Test_TestSkipping.test_unexpected_success_subtestscCs�Gdd�dtj�}g}t|�}|d�}|�|�|�|�|�|gd��|�t|j�d�|�d|jdd�|�	|j
�|�	|j�|�	|���dS)Nc@s"eZdZejdd��Zdd�ZdS)zJTest_TestSkipping.test_unexpected_success_and_fail_in_cleanup.<locals>.FoocSsdSrrrrrrreyszSTest_TestSkipping.test_unexpected_success_and_fail_in_cleanup.<locals>.Foo.test_diecSs|�d�dSrvrVrrrrr[|szSTest_TestSkipping.test_unexpected_success_and_fail_in_cleanup.<locals>.Foo.tearDownNrwrrrrrxs
rrerxr ryrrzrYrrr�+test_unexpected_success_and_fail_in_cleanupws�z=Test_TestSkipping.test_unexpected_success_and_fail_in_cleanupcCs�Gdd�dtj�}g}t|�}|d�}|�|�|�|�|�|gd��|�|j�|�|j�|�|j	�|�|j
|dfg�|�|���dS)Nc@s"eZdZejdd��Zdd�ZdS)zJTest_TestSkipping.test_unexpected_success_and_skip_in_cleanup.<locals>.FoocSsdSrrrrrrre�szSTest_TestSkipping.test_unexpected_success_and_skip_in_cleanup.<locals>.Foo.test_diecSs|�d�dSrrrrrrr[�szSTest_TestSkipping.test_unexpected_success_and_skip_in_cleanup.<locals>.Foo.tearDownNrwrrrrr�s
rrerrr}rYrrr�+test_unexpected_success_and_skip_in_cleanup�s�z=Test_TestSkipping.test_unexpected_success_and_skip_in_cleanupcstG�fdd�dtj��t��}�d�}t�|g�}|�|�|�|�|�|j|dfg�|��j	�|��j
�dS)Ncs>eZdZdZdZ�fdd�Z�fdd�Ze�d�dd��Z	d	S)
z9Test_TestSkipping.test_skip_doesnt_run_setup.<locals>.FooFcs
d�_dS�NT)�wasSetUpr�rrrr"�sz?Test_TestSkipping.test_skip_doesnt_run_setup.<locals>.Foo.setUpcs
d�_dSr�)�wasTornDownrr�rr�tornDown�szBTest_TestSkipping.test_skip_doesnt_run_setup.<locals>.Foo.tornDownr!cSsdSrrrrrrrL�sz@Test_TestSkipping.test_skip_doesnt_run_setup.<locals>.Foo.test_1N)
rrrr�r�r"r�r%rrLrr�rrr�srrLr!)r%r&rSrBr'r(r)r*rjr�r�)rr,r-rErr�r�test_skip_doesnt_run_setup�sz,Test_TestSkipping.test_skip_doesnt_run_setupcsddd��G�fdd�dtj�}t��}|d�}t�|g�}|�|�|�|�|�|j|dfg�dS)Ncs�fdd�}|S)Ncs�|�Srrr/��funcrr�inner�szGTest_TestSkipping.test_decorated_skip.<locals>.decorator.<locals>.innerr)r�r�rr�r�	decorator�sz8Test_TestSkipping.test_decorated_skip.<locals>.decoratorcs"eZdZ�e�d�dd���ZdS)z2Test_TestSkipping.test_decorated_skip.<locals>.Foor!cSsdSrrrrrrrL�sz9Test_TestSkipping.test_decorated_skip.<locals>.Foo.test_1N�rrrr%rrLr�r�rrr�srrLr!�r%r&rSrBr'r(r)r*rNrr�r�test_decorated_skip�sz%Test_TestSkipping.test_decorated_skipcCsXGdd�dtj�}t��}|d�}t�|g�}|�|�|�|�|�|j|dfg�dS)Nc@seZdZejdd��ZdS)z7Test_TestSkipping.test_skip_without_reason.<locals>.FoocSsdSrrrrrrrL�sz>Test_TestSkipping.test_skip_without_reason.<locals>.Foo.test_1Nr�rrrrr�srrL�r�rNrrr�test_skip_without_reason�sz*Test_TestSkipping.test_skip_without_reasoncs�G�fdd�dtj�}g�|d�}|�tj��}|��Wd�n1sL0Y|�dt|j��|��dg�g�|d�}|�tj��}|��Wd�n1s�0Y|�dt|j��|��g�dS)NcsFeZdZ�fdd�Z�fdd�Z�fdd�Ze�d��fdd	��Zd
S)z2Test_TestSkipping.test_debug_skipping.<locals>.Foocs��d�dS�Nr"rHrr	rrr"�sz8Test_TestSkipping.test_debug_skipping.<locals>.Foo.setUpcs��d�dS�Nr[rHrr	rrr[�sz;Test_TestSkipping.test_debug_skipping.<locals>.Foo.tearDowncs|�d���d�dS)N�skipping exception�test1)rrIrr	rrr��s
z8Test_TestSkipping.test_debug_skipping.<locals>.Foo.test1�skipping decoratorcs��d�dS)N�test2rHrr	rrr��sz8Test_TestSkipping.test_debug_skipping.<locals>.Foo.test2N)	rrrr"r[r�r%rr�rr	rrr�s
rr�r�r"r�r�)	r%r&�assertRaises�SkipTest�debugr{�str�	exceptionr)�rrr-�cmrr	r�test_debug_skipping�s&&z%Test_TestSkipping.test_debug_skippingcs�t�d�G�fdd�dtj��}g�|d�}|�tj��}|��Wd�n1sV0Y|�dt|j��|�	�g�dS)Nr!cs0eZdZ�fdd�Z�fdd�Z�fdd�ZdS)z8Test_TestSkipping.test_debug_skipping_class.<locals>.Foocs��d�dSr�rHrr	rrr"�sz>Test_TestSkipping.test_debug_skipping_class.<locals>.Foo.setUpcs��d�dSr�rHrr	rrr[�szATest_TestSkipping.test_debug_skipping_class.<locals>.Foo.tearDowncs��d�dS)Nr-rHrr	rrr-�sz=Test_TestSkipping.test_debug_skipping_class.<locals>.Foo.testN�rrrr"r[r-rr	rrr�srr-)
r%rr&r�r�r�r{r�r�r)r�rr	r�test_debug_skipping_class�s&z+Test_TestSkipping.test_debug_skipping_classcs�G�fdd�dtj�}g�t��}|d�}|�tj��}|��Wd�n1sT0Y|�dt|j��|�	�ddg�dS)Ncs0eZdZ�fdd�Z�fdd�Z�fdd�ZdS)z;Test_TestSkipping.test_debug_skipping_subtests.<locals>.Foocs��d�dSr�rHrr	rrr"�szATest_TestSkipping.test_debug_skipping_subtests.<locals>.Foo.setUpcs��d�dSr�rHrr	rrr[�szDTest_TestSkipping.test_debug_skipping_subtests.<locals>.Foo.tearDowncsX|jdd��.��d�|�d���d�Wd�n1s@0Y��d�dS)Nr r/r9�skip subtestzend subtestzend test)r6rIrrr	rrr-s


(z@Test_TestSkipping.test_debug_skipping_subtests.<locals>.Foo.testNr�rr	rrr�srr-r�r"r9)
r%r&rr�r�r�r{r�r�r))rrr,r-r�rr	r�test_debug_skipping_subtests�s&z.Test_TestSkipping.test_debug_skipping_subtestsN)rrrr.r=rFrOrTrZr]rarbrnrqrsrur|r~r�r�r�r�r�r�r�r�r�r�rrrrrs2*#(



r�__main__)r%Zunittest.test.supportrr&rr�mainrrrr�<module>s

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists