
    =e1                    ~   d dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlZd dlZd dl	Z	d dl
Z
d dlmZ d dlmZ d dlZd dlmZmZmZmZmZ d dlmZmZ  ej        d          Z ej        d          Z ej        d          Z G d	 d
e          Z G d dej        ee          Z e!dk    r ej"                     dS dS )    N)deepcopy)support)TestEqualityTestHashingLoggingResultLegacyLoggingResult#ResultWithNoStartTestRunStopTestRun)captured_stderr
gc_collectfoofoo.barquuxc                   z    e Zd ZdZ G d dej                  Z G d de          Z G d dej                  ZdS )	Testz5Keep these TestCase classes out of the main namespacec                       e Zd Zd Zd ZdS )Test.Fooc                     d S N selfs    ./usr/lib/python3.11/unittest/test/test_case.pyrunTestzTest.Foo.runTest"             c                     d S r   r   r   s    r   test1zTest.Foo.test1#   r   r   N)__name__
__module____qualname__r   r   r   r   r   Foor   !   s"        r   r!   c                       e Zd Zd ZdS )Test.Barc                     d S r   r   r   s    r   test2zTest.Bar.test2&   r   r   N)r   r   r    r%   r   r   r   Barr#   %   s        r   r&   c                   4     e Zd ZdZ fdZd Zd Zd Z xZS )Test.LoggingTestCasez!A test case which logs its calls.c                 p    t          t          j        |                               d           || _        d S Ntest)superr   LoggingTestCase__init__events)r   r/   	__class__s     r   r.   zTest.LoggingTestCase.__init__+   s/    $&--66v>>> DKKKr   c                 :    | j                             d           d S )NsetUpr/   appendr   s    r   r2   zTest.LoggingTestCase.setUp/   s    Kw'''''r   c                 :    | j                             d           d S r*   r3   r   s    r   r+   zTest.LoggingTestCase.test2   s    Kv&&&&&r   c                 :    | j                             d           d S )NtearDownr3   r   s    r   r7   zTest.LoggingTestCase.tearDown5   s    Kz*****r   )	r   r   r    __doc__r.   r2   r+   r7   __classcell__)r0   s   @r   r-   r(   (   sk        //	! 	! 	! 	! 	!	( 	( 	(	' 	' 	'	+ 	+ 	+ 	+ 	+ 	+ 	+r   r-   N)	r   r   r    r8   unittestTestCaser!   r&   r-   r   r   r   r   r      s        ;;    h       c   + + + + +(+ + + + + +r   r   c                      e Zd Ze                    d          e                    d          fgZe                    d          e                    d          fe                    d          e                    d          fe                    d          e                    d          fg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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) e*j+        e,j-        j.        d&k    d'          d(             Z/ e*j+        e,j-        j.        d&k    d'          d)             Z0 e*j+        e,j-        j.        d&k    d'          d*             Z1d+ Z2d, Z3d- Z4d. Z5d/ Z6d0 Z7d1 Z8d2 Z9d3 Z:d4 Z;d5 Z<d6 Z=d7 Z>d8 Z?d9 Z@d: ZAd; ZBd< ZCd= ZDd> ZEd? ZFd@ ZGdA ZHdB ZIdC ZJdD ZKdE ZLdF ZMdG ZNdH ZOdI ZPdJ ZQdK ZRdL ZSdM ZTdN ZUdO ZVdP ZWdQ ZXdR ZYdS ZZe[j\        dT             Z]dU Z^dV Z_dW Z`dX ZadY ZbdZ Zcd[ Zdd\ Zed] Zfd^ Zgd_ Zhd` Zida Zjdb Zkdc Zldd Zmde Zndf Zodg Zpdh Zqdi Zrdj Zsdk Ztdl Zudm Zvdn Zwdo Zxeyjz        dp             Z{dq Z|drS )sTest_TestCaser   r   r%   c                     G d dt           j                  }|                      |                                            dd          d           t          j                    }|                    dd           |                    |j                  5  |                    dd           d d d            n# 1 swxY w Y   |                     t                    5  |                                 d d d            d S # 1 swxY w Y   d S )Nc                       e Zd Zd Zd ZdS )3Test_TestCase.test_init__no_test_name.<locals>.Testc                     t                      r   MyExceptionr   s    r   r   z;Test_TestCase.test_init__no_test_name.<locals>.Test.runTestU       []]2r   c                     d S r   r   r   s    r   r+   z8Test_TestCase.test_init__no_test_name.<locals>.Test.testV   r   r   Nr   r   r    r   r+   r   r   r   r   r@   T   "        222     r   r   iz.Test.runTest      )r:   r;   assertEqualidassertRaisesfailureExceptionAttributeErrorrun)r   r   r+   s      r   test_init__no_test_namez%Test_TestCase.test_init__no_test_nameS   s   	! 	! 	! 	! 	!8$ 	! 	! 	! 	STT*O<<<  ""At455 	# 	#Q"""	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# ~.. 	 	HHJJJ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	s$   B77B;>B;C>>DDc                      G d dt           j                  }|                      |d                                          dd          d           d S )Nc                       e Zd Zd Zd ZdS )7Test_TestCase.test_init__test_name__valid.<locals>.Testc                     t                      r   rB   r   s    r   r   z?Test_TestCase.test_init__test_name__valid.<locals>.Test.runTestj   rD   r   c                     d S r   r   r   s    r   r+   z<Test_TestCase.test_init__test_name__valid.<locals>.Test.testk   r   r   NrF   r   r   r   r   rS   i   rG   r   r   r+   iz
.Test.test)r:   r;   rJ   rK   r   r   s     r   test_init__test_name__validz)Test_TestCase.test_init__test_name__validh   sh    	! 	! 	! 	! 	!8$ 	! 	! 	! 	f**3440,?????r   c                      G d dt           j                  }	  |d           |                     d           d S # t          $ r Y d S w xY w)Nc                       e Zd Zd Zd ZdS )9Test_TestCase.test_init__test_name__invalid.<locals>.Testc                     t                      r   rB   r   s    r   r   zATest_TestCase.test_init__test_name__invalid.<locals>.Test.runTestu   rD   r   c                     d S r   r   r   s    r   r+   z>Test_TestCase.test_init__test_name__invalid.<locals>.Test.testv   r   r   NrF   r   r   r   r   rZ   t   rG   r   r   testfoozFailed to raise ValueError)r:   r;   fail
ValueErrorrV   s     r   test_init__test_name__invalidz+Test_TestCase.test_init__test_name__invalids   s    	! 	! 	! 	! 	!8$ 	! 	! 	!	4DOOO II233333  	 	 	DD	s   < 
A
	A
c                      G d dt           j                  }|                      |d                                          d           d S )Nc                       e Zd Zd ZdS ).Test_TestCase.test_countTestCases.<locals>.Fooc                     d S r   r   r   s    r   r+   z3Test_TestCase.test_countTestCases.<locals>.Foo.test   r   r   Nr   r   r    r+   r   r   r   r!   rc      s             r   r!   r+      )r:   r;   rJ   countTestCasesr   r!   s     r   test_countTestCasesz!Test_TestCase.test_countTestCases   sa    	! 	! 	! 	! 	!(# 	! 	! 	! 	V3355q99999r   c                      G d dt           j                  } |                                            }|                     t	          |          t           j                   d S )Nc                       e Zd Zd ZdS )1Test_TestCase.test_defaultTestResult.<locals>.Fooc                     d S r   r   r   s    r   r   z9Test_TestCase.test_defaultTestResult.<locals>.Foo.runTest       r   Nr   r   r    r   r   r   r   r!   rl      #            r   r!   )r:   r;   defaultTestResultrJ   type
TestResult)r   r!   results      r   test_defaultTestResultz$Test_TestCase.test_defaultTestResult   sm    	 	 	 	 	(# 	 	 	 ((**fx':;;;;;r   c                     g }t          |          } G fddt          j                   |                              |           g d}|                     ||           d S )Nc                   "     e Zd Z fdZ xZS )>Test_TestCase.test_run_call_order__error_in_setUp.<locals>.Fooc                 f    t          |                                            t          d          Nzraised by Foo.setUpr,   r2   RuntimeErrorr   r!   r0   s    r   r2   zDTest_TestCase.test_run_call_order__error_in_setUp.<locals>.Foo.setUp   .    c4  &&((("#8999r   )r   r   r    r2   r9   r0   r!   s   @r   r!   rx      s>        : : : : : : : : : :r   r!   )	startTestr2   addErrorstopTestr   r   r-   rO   rJ   r   r/   rt   expectedr!   s       @r   #test_run_call_order__error_in_setUpz1Test_TestCase.test_run_call_order__error_in_setUp   s    v&&	: 	: 	: 	: 	: 	: 	:$& 	: 	: 	:
 	FAAA*****r   c                     g } G fddt           j                   |                                           g d}|                     ||           d S )Nc                   (     e Zd Zd Z fdZ xZS )MTest_TestCase.test_run_call_order__error_in_setUp_default_result.<locals>.Fooc                 *    t          | j                  S r   r   r/   r   s    r   rq   z_Test_TestCase.test_run_call_order__error_in_setUp_default_result.<locals>.Foo.defaultTestResult       $T[111r   c                 f    t          |                                            t          d          rz   r{   r}   s    r   r2   zSTest_TestCase.test_run_call_order__error_in_setUp_default_result.<locals>.Foo.setUp   r~   r   )r   r   r    rq   r2   r9   r   s   @r   r!   r      sM        2 2 2: : : : : : : : : :r   r!   )startTestRunr   r2   r   r   stopTestRunr   r-   rO   rJ   r   r/   r   r!   s      @r   2test_run_call_order__error_in_setUp_default_resultz@Test_TestCase.test_run_call_order__error_in_setUp_default_result   s    	: 	: 	: 	: 	: 	: 	:$& 	: 	: 	: 	F/ / /*****r   c                     g }t          |          } G fddt          j                  g d} |                              |           |                     ||           d S )Nc                   "     e Zd Z fdZ xZS )=Test_TestCase.test_run_call_order__error_in_test.<locals>.Fooc                 f    t          |                                            t          d          Nraised by Foo.testr,   r+   r|   r}   s    r   r+   zBTest_TestCase.test_run_call_order__error_in_test.<locals>.Foo.test   .    c4  %%'''"#7888r   r   r   r    r+   r9   r   s   @r   r!   r      s>        9 9 9 9 9 9 9 9 9 9r   r!   )r   r2   r+   r   r7   r   r   r   s       @r   "test_run_call_order__error_in_testz0Test_TestCase.test_run_call_order__error_in_test   s    v&&	9 	9 	9 	9 	9 	9 	9$& 	9 	9 	9
8 8 8F*****r   c                     g } G fddt           j                  g d} |                                           |                     ||           d S )Nc                   (     e Zd Zd Z fdZ xZS )LTest_TestCase.test_run_call_order__error_in_test_default_result.<locals>.Fooc                 *    t          | j                  S r   r   r   s    r   rq   z^Test_TestCase.test_run_call_order__error_in_test_default_result.<locals>.Foo.defaultTestResult   r   r   c                 f    t          |                                            t          d          r   r   r}   s    r   r+   zQTest_TestCase.test_run_call_order__error_in_test_default_result.<locals>.Foo.test   r   r   r   r   r    rq   r+   r9   r   s   @r   r!   r      sM        2 2 29 9 9 9 9 9 9 9 9 9r   r!   )r   r   r2   r+   r   r7   r   r   r   r   s      @r   1test_run_call_order__error_in_test_default_resultz?Test_TestCase.test_run_call_order__error_in_test_default_result   s    	9 	9 	9 	9 	9 	9 	9$& 	9 	9 	9G G GF*****r   c                     g }t          |          } G fddt          j                  g d} |                              |           |                     ||           d S )Nc                   "     e Zd Z fdZ xZS )?Test_TestCase.test_run_call_order__failure_in_test.<locals>.Fooc                 v    t          |                                            |                     d           d S r   r,   r+   r^   r}   s    r   r+   zDTest_TestCase.test_run_call_order__failure_in_test.<locals>.Foo.test   8    c4  %%'''		./////r   r   r   s   @r   r!   r      s>        0 0 0 0 0 0 0 0 0 0r   r!   r   r2   r+   
addFailurer7   r   r   r   s       @r   $test_run_call_order__failure_in_testz2Test_TestCase.test_run_call_order__failure_in_test   s    v&&	0 	0 	0 	0 	0 	0 	0$& 	0 	0 	0
: : :F*****r   c                      G fddt           j                  g d}g } |                                           |                     ||           d S )Nc                   (     e Zd Zd Z fdZ xZS )NTest_TestCase.test_run_call_order__failure_in_test_default_result.<locals>.Fooc                 *    t          | j                  S r   r   r   s    r   rq   z`Test_TestCase.test_run_call_order__failure_in_test_default_result.<locals>.Foo.defaultTestResult   r   r   c                 v    t          |                                            |                     d           d S r   r   r}   s    r   r+   zSTest_TestCase.test_run_call_order__failure_in_test_default_result.<locals>.Foo.test   r   r   r   r   s   @r   r!   r      sM        2 2 20 0 0 0 0 0 0 0 0 0r   r!   )r   r   r2   r+   r   r7   r   r   r   )r   r   r/   r!   s      @r   3test_run_call_order__failure_in_test_default_resultzATest_TestCase.test_run_call_order__failure_in_test_default_result   s    	0 	0 	0 	0 	0 	0 	0$& 	0 	0 	0I I IF*****r   c                     g }t          |          } G fddt          j                   |                              |           g d}|                     ||           d S )Nc                   "     e Zd Z fdZ xZS )ATest_TestCase.test_run_call_order__error_in_tearDown.<locals>.Fooc                 f    t          |                                            t          d          Nzraised by Foo.tearDownr,   r7   r|   r}   s    r   r7   zJTest_TestCase.test_run_call_order__error_in_tearDown.<locals>.Foo.tearDown  .    c4  ))+++"#;<<<r   )r   r   r    r7   r9   r   s   @r   r!   r     s>        = = = = = = = = = =r   r!   )r   r2   r+   r7   r   r   r   r   s       @r   &test_run_call_order__error_in_tearDownz4Test_TestCase.test_run_call_order__error_in_tearDown  s    v&&	= 	= 	= 	= 	= 	= 	=$& 	= 	= 	=
 	F     *****r   c                      G fddt           j                  g } |                                           g d}|                     ||           d S )Nc                   (     e Zd Zd Z fdZ xZS )PTest_TestCase.test_run_call_order__error_in_tearDown_default_result.<locals>.Fooc                 *    t          | j                  S r   r   r   s    r   rq   zbTest_TestCase.test_run_call_order__error_in_tearDown_default_result.<locals>.Foo.defaultTestResult  r   r   c                 f    t          |                                            t          d          r   r   r}   s    r   r7   zYTest_TestCase.test_run_call_order__error_in_tearDown_default_result.<locals>.Foo.tearDown  r   r   )r   r   r    rq   r7   r9   r   s   @r   r!   r     sM        2 2 2= = = = = = = = = =r   r!   )r   r   r2   r+   r7   r   r   r   r   r   s      @r   5test_run_call_order__error_in_tearDown_default_resultzCTest_TestCase.test_run_call_order__error_in_tearDown_default_result  s    	= 	= 	= 	= 	= 	= 	=$& 	= 	= 	= F; ; ;*****r   c                 p     G d dt           j                  } |d                                           d S )Nc                       e Zd Zd Zd ZdS )=Test_TestCase.test_run_call_order_default_result.<locals>.Fooc                     t                      S r   )r	   r   s    r   rq   zOTest_TestCase.test_run_call_order_default_result.<locals>.Foo.defaultTestResult.  s    :<<<r   c                     d S r   r   r   s    r   r+   zBTest_TestCase.test_run_call_order_default_result.<locals>.Foo.test0  rn   r   N)r   r   r    rq   r+   r   r   r   r!   r   -  s2        = = =    r   r!   r+   )r:   r;   rO   rh   s     r   "test_run_call_order_default_resultz0Test_TestCase.test_run_call_order_default_result+  sO    	 	 	 	 	(# 	 	 	 	Fr   c                     G d d           G fddt           j                  }|                     t                    5 } |d                                           d d d            n# 1 swxY w Y   |                     dt          |j                             |                     dt          |j                             |                     |j	        t                     |                     t                    5 } |d                                           d d d            n# 1 swxY w Y   |                     dt          |j                             |                     dt          |j                             |                     |j	        t                     |                     t                    5 } |d                                           d d d            n# 1 swxY w Y   |                     dt          |j                             |                     dt          |j                             |                     |j	        t                     d S )	Nc                       e Zd Zd ZdS )GTest_TestCase.test_deprecation_of_return_val_from_test.<locals>.Nothingc                 
    |d u S r   r   )r   os     r   __eq__zNTest_TestCase.test_deprecation_of_return_val_from_test.<locals>.Nothing.__eq__8  s    Dy r   N)r   r   r    r   r   r   r   Nothingr   7  s#        ! ! ! ! !r   r   c                   &    e Zd Zd Zd Z fdZdS )CTest_TestCase.test_deprecation_of_return_val_from_test.<locals>.Fooc                     dS Nrf   r   r   s    r   r   zITest_TestCase.test_deprecation_of_return_val_from_test.<locals>.Foo.test1;  s    qr   c              3      K   dV  d S r   r   r   s    r   r%   zITest_TestCase.test_deprecation_of_return_val_from_test.<locals>.Foo.test2=  s      r   c                                  S r   r   )r   r   s    r   test3zITest_TestCase.test_deprecation_of_return_val_from_test.<locals>.Foo.test3?  s    wyy r   N)r   r   r    r   r%   r   )r   s   r   r!   r   :  sL            ! ! ! ! ! ! !r   r!   r   z3It is deprecated to return a value that is not Noner%   r   )r:   r;   assertWarnsDeprecationWarningrO   assertInstrwarningrJ   filename__file__)r   r!   wr   s      @r   (test_deprecation_of_return_val_from_testz6Test_TestCase.test_deprecation_of_return_val_from_test5  s   	! 	! 	! 	! 	! 	! 	! 	!	! 	! 	! 	! 	! 	! 	!(# 	! 	! 	! 011 	QCLL	 	 	 	 	 	 	 	 	 	 	 	 	 	 	KSQRQZ^^\\\gs19~~...X...011 	QCLL	 	 	 	 	 	 	 	 	 	 	 	 	 	 	KSQRQZ^^\\\gs19~~...X...011 	QCLL	 	 	 	 	 	 	 	 	 	 	 	 	 	 	KSQRQZ^^\\\gs19~~...X.....s6   A--A14A1D,,D03D0G++G/2G/c                      G fddt           j                   |                              |           |                     ||           d S )Nc                   "     e Zd Z fdZ xZS )6Test_TestCase._check_call_order__subtests.<locals>.Fooc           	         t          |                                            dD ]}|                     |          5  |dk    r|                     d           dD ]I}|                     |          5  ||z  dk    rt	          d          	 d d d            n# 1 swxY w Y   J	 d d d            n# 1 swxY w Y   dd	z   d S )
Nrf   rI   rH   irf   failurerI   rH   j   r   r   )r,   r+   subTestr^   r|   r   r   r   r!   r0   s      r   r+   z;Test_TestCase._check_call_order__subtests.<locals>.Foo.testV  s   c4  %%'''" M MA** M M66 IIi000!' M MA!%!2!2 M M#$q5A::*67K*L*L$L $.M M M M M M M M M M M M M M MMM M M M M M M M M M M M M M M As5   6B34B	B3BB3!B"B33B7	:B7	r   r   s   @r   r!   r   U  s>        
 
 
 
 
 
 
 
 
 
r   r!   r   r   rt   r/   expected_eventsr!   s       @r   _check_call_order__subtestsz)Test_TestCase._check_call_order__subtestsT  sr    	 	 	 	 	 	 	$& 	 	 	( 	F11111r   c                 ^    g }t          |          }g d}|                     |||           d S )N)r   r2   r+   addSubTestFailureaddSubTestSuccessr   r   r   r   r7   r   )r   r   r   r/   rt   r   s       r   test_run_call_order__subtestsz+Test_TestCase.test_run_call_order__subtestsl  sH    v&&M M M 	((BBBBBr   c                 ^    g }t          |          }g d}|                     |||           d S )Nr   )r   r   r   s       r   $test_run_call_order__subtests_legacyz2Test_TestCase.test_run_call_order__subtests_legacyu  sE     $V,,: : :((BBBBBr   c                      G fddt           j                   |                              |           |                     ||           d S )Nc                   "     e Zd Z fdZ xZS )>Test_TestCase._check_call_order__subtests_success.<locals>.Fooc           	         t          |                                            dD ]e}|                     |          5  dD ]1}|                     |          5  	 d d d            n# 1 swxY w Y   2	 d d d            n# 1 swxY w Y   fd S )N)rf   rI   r   r   r   )r,   r+   r   r   s      r   r+   zCTest_TestCase._check_call_order__subtests_success.<locals>.Foo.test  s#   c4  %%''' % %A** % %!' % %A!%!2!2 % % $% % % % % % % % % % % % % % %%% % % % % % % % % % % % % % %% %s5   B A'	B 'A++B .A+/B  B	B	r   r   s   @r   r!   r     >        % % % % % % % % % %r   r!   r   r   s       @r   #_check_call_order__subtests_successz1Test_TestCase._check_call_order__subtests_success~  sr    	% 	% 	% 	% 	% 	% 	%$& 	% 	% 	% 	F11111r   c                 v    g }t          |          }g dddgz  z   g dz   }|                     |||           d S )N)r   r2   r+   r   r   )r7   
addSuccessr   )r   r   r   s       r   %test_run_call_order__subtests_successz3Test_TestCase.test_run_call_order__subtests_success  s`    v&& 322.//0<<<= 	00JJJJJr   c                 ^    g }t          |          }g d}|                     |||           d S )N)r   r2   r+   r7   r   r   )r   r   r   s       r   ,test_run_call_order__subtests_success_legacyz:Test_TestCase.test_run_call_order__subtests_success_legacy  sC    $V,,. . .00JJJJJr   c                     g }t          |          }d|_         G fddt          j                  g d} |                              |           |                     ||           d S )NTc                   "     e Zd Z fdZ xZS )ATest_TestCase.test_run_call_order__subtests_failfast.<locals>.Fooc                    t          |                                            |                     d          5  |                     d           d d d            n# 1 swxY w Y   |                     d          5  |                     d           d d d            n# 1 swxY w Y   |                     d           d S )Nrf   r   r   rI   )r,   r+   r   r^   r}   s    r   r+   zFTest_TestCase.test_run_call_order__subtests_failfast.<locals>.Foo.test  s-   c4  %%'''\\A\&& ) )IIi((() ) ) ) ) ) ) ) ) ) ) ) ) ) )\\A\&& ) )IIi((() ) ) ) ) ) ) ) ) ) ) ) ) ) )		)$$$$$s#   AA #A =BB#&B#r   r   s   @r   r!   r    r   r   r!   )r   r2   r+   r   r7   r   )r   failfastr   r-   rO   rJ   r   s       @r   &test_run_call_order__subtests_failfastz4Test_TestCase.test_run_call_order__subtests_failfast  s    v&&	% 	% 	% 	% 	% 	% 	%$& 	% 	% 	%A A AF*****r   c                    g  G fddt           j                  }t          j                    }d|_        t          j                                        |          }|                    |           g d}|                     |           d S )Nc                   .    e Zd Z fdZ fdZ fdZdS )1Test_TestCase.test_subtests_failfast.<locals>.Fooc                     |                                  5                      d           d d d            n# 1 swxY w Y                       d           d S )Na1a2)r   r4   r   r/   s    r   test_az8Test_TestCase.test_subtests_failfast.<locals>.Foo.test_a  s    \\^^ ( (MM$'''( ( ( ( ( ( ( ( ( ( ( ( ( ( (d#####s   8<<c                 6   |                                  5                      d           d d d            n# 1 swxY w Y   |                                  5  |                     d           d d d            n# 1 swxY w Y                       d           d S )Nb1r   b2)r   r4   r^   r  s    r   test_bz8Test_TestCase.test_subtests_failfast.<locals>.Foo.test_b  s   \\^^ ( (MM$'''( ( ( ( ( ( ( ( ( ( ( ( ( ( (\\^^ ) )IIi((() ) ) ) ) ) ) ) ) ) ) ) ) ) )d#####s   8<<A99A= A=c                 2                         d           d S )Ncr4   r  s    r   test_cz8Test_TestCase.test_subtests_failfast.<locals>.Foo.test_c  s    c"""""r   N)r   r   r    r  r  r  r/   s   r   r!   r	    s`        $ $ $ $ $
$ $ $ $ $# # # # # # #r   r!   T)r  r  r  )r:   r;   rs   r  
TestLoaderloadTestsFromTestCaserO   rJ   )r   r!   rt   suiter   r/   s        @r   test_subtests_failfastz$Test_TestCase.test_subtests_failfast  s    	# 	# 	# 	# 	# 	# 	#(# 	# 	# 	#  $&&#%%;;C@@		&%%%*****r   c                     g  G fddt           j                  } |d                                           |                     ddg           d S )Nc                       e Zd Z fdZdS ).Test_TestCase.test_subtests_debug.<locals>.Fooc                                          d           |                                 5                       d           d d d            d S # 1 swxY w Y   d S )N	test case	subtest 1)r4   r   r  s    r   r  z5Test_TestCase.test_subtests_debug.<locals>.Foo.test_a  s    k***\\^^ / /MM+.../ / / / / / / / / / / / / / / / / /s   AAAN)r   r   r    r  r  s   r   r!   r    s.        / / / / / / /r   r!   r  r   r!  )r:   r;   debugrJ   )r   r!   r/   s     @r   test_subtests_debugz!Test_TestCase.test_subtests_debug  s|    	/ 	/ 	/ 	/ 	/ 	/ 	/(# 	/ 	/ 	/ 	H+{!;<<<<<r   c                      G d dt           j                  }|                      |d          j        t                     d S )Nc                       e Zd Zd ZdS )9Test_TestCase.test_failureException__default.<locals>.Fooc                     d S r   r   r   s    r   r+   z>Test_TestCase.test_failureException__default.<locals>.Foo.test  rn   r   Nre   r   r   r   r!   r&    rp   r   r!   r+   )r:   r;   assertIsrM   AssertionErrorrh   s     r   test_failureException__defaultz,Test_TestCase.test_failureException__default  sV    	 	 	 	 	(# 	 	 	 	cc&kk2NCCCCCr   c                    g }t          |          } G d dt          j                  }|                      |d          j        t
                      |d                              |           g d}|                     ||           d S )Nc                       e Zd Zd ZeZdS )MTest_TestCase.test_failureException__subclassing__explicit_raise.<locals>.Fooc                     t                      r   )r|   r   s    r   r+   zRTest_TestCase.test_failureException__subclassing__explicit_raise.<locals>.Foo.test  s    "nn$r   Nr   r   r    r+   r|   rM   r   r   r   r!   r-    s'        % % %  ,r   r!   r+   r   r   r   r   r:   r;   r(  rM   r|   rO   rJ   r   r/   rt   r!   r   s        r   2test_failureException__subclassing__explicit_raisez@Test_TestCase.test_failureException__subclassing__explicit_raise      v&&	, 	, 	, 	, 	,(# 	, 	, 	, 	cc&kk2LAAA 	F:::*****r   c                    g }t          |          } G d dt          j                  }|                      |d          j        t
                      |d                              |           g d}|                     ||           d S )Nc                       e Zd Zd ZeZdS )MTest_TestCase.test_failureException__subclassing__implicit_raise.<locals>.Fooc                 0    |                      d           d S Nr   )r^   r   s    r   r+   zRTest_TestCase.test_failureException__subclassing__implicit_raise.<locals>.Foo.test  s    		%     r   Nr/  r   r   r   r!   r7    s'        ! ! !  ,r   r!   r+   r0  r1  r2  s        r   2test_failureException__subclassing__implicit_raisez@Test_TestCase.test_failureException__subclassing__implicit_raise  r4  r   c                 n     G d dt           j                  } |                                             d S )Nc                       e Zd Zd ZdS )%Test_TestCase.test_setUp.<locals>.Fooc                     d S r   r   r   s    r   r   z-Test_TestCase.test_setUp.<locals>.Foo.runTest  rn   r   Nro   r   r   r   r!   r=    rp   r   r!   )r:   r;   r2   rh   s     r   
test_setUpzTest_TestCase.test_setUp  sH    	 	 	 	 	(# 	 	 	
 	r   c                 n     G d dt           j                  } |                                             d S )Nc                       e Zd Zd ZdS )(Test_TestCase.test_tearDown.<locals>.Fooc                     d S r   r   r   s    r   r   z0Test_TestCase.test_tearDown.<locals>.Foo.runTest   rn   r   Nro   r   r   r   r!   rB    rp   r   r!   )r:   r;   r7   rh   s     r   test_tearDownzTest_TestCase.test_tearDown  sM    	 	 	 	 	(# 	 	 	
 	r   c                      G d dt           j                  }|                      |                                            t                     d S )Nc                       e Zd Zd ZdS )"Test_TestCase.test_id.<locals>.Fooc                     d S r   r   r   s    r   r   z*Test_TestCase.test_id.<locals>.Foo.runTest.  rn   r   Nro   r   r   r   r!   rG  -  rp   r   r!   )r:   r;   assertIsInstancerK   r   rh   s     r   test_idzTest_TestCase.test_id,  s[    	 	 	 	 	(# 	 	 	 	cceehhjj#.....r   c                     g t                     G fddt          j                  } |d                                          }|                     |           g d}|                     |           d S )Nc                   $    e Zd ZfdZ fdZdS );Test_TestCase.test_run__uses_defaultTestResult.<locals>.Fooc                 2                         d           d S r*   r  r  s    r   r+   z@Test_TestCase.test_run__uses_defaultTestResult.<locals>.Foo.test=  s    f%%%%%r   c                     S r   r   )r   defaultResults    r   rq   zMTest_TestCase.test_run__uses_defaultTestResult.<locals>.Foo.defaultTestResult@  s	    $$r   N)r   r   r    r+   rq   )rP  r/   s   r   r!   rM  <  sG        & & & & &% % % % % % %r   r!   r+   )r   r   r+   r   r   r   )r   r:   r;   rO   r(  rJ   )r   r!   rt   r   rP  r/   s       @@r    test_run__uses_defaultTestResultz.Test_TestCase.test_run__uses_defaultTestResult8  s    %f--	% 	% 	% 	% 	% 	% 	% 	%(# 	% 	% 	% V""fm,,,' ' '*****r   c                      G d dt           j                  }t          j                    } |d                              |          }|                     ||           d S )Nc                       e Zd Zd ZdS )9Test_TestCase.test_run__returns_given_result.<locals>.Fooc                     d S r   r   r   s    r   r+   z>Test_TestCase.test_run__returns_given_result.<locals>.Foo.testP  rn   r   Nre   r   r   r   r!   rT  O  rp   r   r!   r+   )r:   r;   rs   rO   r(  )r   r!   rt   retvals       r   test_run__returns_given_resultz,Test_TestCase.test_run__returns_given_resultM  sr    	 	 	 	 	(# 	 	 	 $&&V((ff%%%%%r   c                     t          j                    t          j                     G fddt           j                  }  |d                    }|                     |           d S )Nc                   "    e Zd Zd Z fdZdS )KTest_TestCase.test_call__invoking_an_instance_delegates_to_run.<locals>.Fooc                     d S r   r   r   s    r   r+   zPTest_TestCase.test_call__invoking_an_instance_delegates_to_run.<locals>.Foo.test`  rn   r   c                 4    |                      |           S r   )r(  )r   rt   resultIn	resultOuts     r   rO   zOTest_TestCase.test_call__invoking_an_instance_delegates_to_run.<locals>.Foo.runc  s    fh///  r   N)r   r   r    r+   rO   )r]  r^  s   r   r!   rZ  _  sB          ! ! ! ! ! ! ! !r   r!   r+   )r:   rs   r;   r(  )r   r!   rV  r]  r^  s      @@r   0test_call__invoking_an_instance_delegates_to_runz>Test_TestCase.test_call__invoking_an_instance_delegates_to_run[  s    &(('))		! 	! 	! 	! 	! 	! 	! 	!(# 	! 	! 	! VX&&fi(((((r   c                 T    |                      |                                            d S r   )assertIsNoneshortDescriptionr   s    r   $testShortDescriptionWithoutDocstringz2Test_TestCase.testShortDescriptionWithoutDocstringl  s(    $//1122222r   rI   z)Docstrings are omitted with -O2 and abovec                 V    |                      |                                 d            dS )z7Tests shortDescription() for a method with a docstring.NrJ   rb  r   s    r   (testShortDescriptionWithOneLineDocstringz6Test_TestCase.testShortDescriptionWithOneLineDocstringo  s=     	%%''I	K 	K 	K 	K 	Kr   c                 V    |                      |                                 d           dS )zTests shortDescription() for a method with a longer docstring.

        This method ensures that only the first line of a docstring is
        returned used in the short description, no matter how long the
        whole thing is.
        z>Tests shortDescription() for a method with a longer docstring.Nre  r   s    r   *testShortDescriptionWithMultiLineDocstringz8Test_TestCase.testShortDescriptionWithMultiLineDocstringw  s:     	%%''	 	 	 	 	r   c                 V    |                      |                                 d           dS )z
            Tests shortDescription() whitespace is trimmed, so that the first
            line of nonwhite-space text becomes the docstring.
        zATests shortDescription() whitespace is trimmed, so that the firstNre  r   s    r   &testShortDescriptionWhitespaceTrimmingz4Test_TestCase.testShortDescriptionWhitespaceTrimming  s=     	!!##O	Q 	Q 	Q 	Q 	Qr   c                      G d dt                                               }}|                     ||k               dfd	}|                     |           |                     ||           d S )Nc                       e Zd ZdZdS )7Test_TestCase.testAddTypeEqualityFunc.<locals>.SadSnakez)Dummy class for test_addTypeEqualityFunc.N)r   r   r    r8   r   r   r   SadSnakerm    s        ;;;;r   rn  c                 X    t          |           t          |          cxk    ok    nc S r   )rr   )abmsgrn  s      r   AllSnakesCreatedEqualzDTest_TestCase.testAddTypeEqualityFunc.<locals>.AllSnakesCreatedEqual  s1    77d1gg111111111r   r   )objectassertFalseaddTypeEqualityFuncrJ   )r   s1s2rs  rn  s       @r   testAddTypeEqualityFuncz%Test_TestCase.testAddTypeEqualityFunc  s    	< 	< 	< 	< 	<v 	< 	< 	<XXZZBr"""	2 	2 	2 	2 	2 	2  +@AAAR     r   c                     t                      }|                     ||           |                     | j        | j        |t                                 d S r   )rt  r(  rL   rM   r   things     r   testAssertIszTest_TestCase.testAssertIs  sH    eU###$/vxxPPPPPr   c                     t                      }|                     |t                                 |                     | j        | j        ||           d S r   )rt  assertIsNotrL   rM   r{  s     r   testAssertIsNotzTest_TestCase.testAssertIsNot  sK    )))$/1A5%PPPPPr   c                     g }|                      |t                     |                     | j        | j         |t                     d S r   )rI  listrL   rM   dictr{  s     r   testAssertIsInstancez"Test_TestCase.testAssertIsInstance  sN    eT***$/1F	' 	' 	' 	' 	'r   c                     g }|                      |t                     |                     | j        | j         |t                     d S r   )assertNotIsInstancer  rL   rM   r  r{  s     r   testAssertNotIsInstancez%Test_TestCase.testAssertNotIsInstance  sN      ---$/1I	' 	' 	' 	' 	'r   c                    dddd}|                      dd           |                      dg d           |                      d	|           |                     d
d           |                     dg d           |                     d|           |                     | j        | j         dd           |                     | j        | j         dg d           |                     | j        | j         d|           |                     | j        | j        dd           |                     | j        | j        dg d           |                     | j        | j        d|           d S )Nbananagrassfish)monkeycowsealrp  abcrI   r   r  dr   otterx   elephantr  rf   r  )r   assertNotInrL   rM   )r   animalss     r   testAssertInzTest_TestCase.testAssertIn  sv   %gvFFc5!!!a###h(((e$$$III&&&'***$/UKKK$/999MMM$/
!	# 	# 	# 	$/1A3NNN$/1A1iiiPPP$/1A5!	# 	# 	# 	# 	#r   c                 x   t          j                    5  t          j        dt                     |                     i i            |                     i ddi           |                     ddiddi           |                     ddiddd           |                     dddddd           |                     | j                  5  |                     ddii            d d d            n# 1 swxY w Y   |                     | j                  5  |                     ddiddi           d d d            n# 1 swxY w Y   |                     | j                  5  |                     ddiddi           d d d            n# 1 swxY w Y   |                     | j                  5  |                     dddddi           d d d            n# 1 swxY w Y   |                     | j                  5  |                     dddddi           d d d            n# 1 swxY w Y   d	                    d
 t          d          D                       }|                     | j                  5  |                     d|iddi           d d d            n# 1 swxY w Y   d d d            d S # 1 swxY w Y   d S )Nignorerp  rf   rI   rp  rq  oner  )rp  r   c              3   4   K   | ]}t          |          V  d S r   )chr).0r   s     r   	<genexpr>z=Test_TestCase.testAssertDictContainsSubset.<locals>.<genexpr>  s(      55Q#a&&555555r      r   u   �)	warningscatch_warningssimplefilterr   assertDictContainsSubsetrL   rM   joinrange)r   r  s     r   testAssertDictContainsSubsetz*Test_TestCase.testAssertDictContainsSubset  s   $&& 	O 	O!(,>???))"b111))"sAh777))3(S!H===))3(!!4D4DEEE))*:*:!!<L<LMMM""4#899 > >--q%j"===> > > > > > > > > > > > > > > ""4#899 B B--sAhaAAAB B B B B B B B B B B B B B B ""4#899 B B--sAhaAAAB B B B B B B B B B B B B B B ""4#899 J J--AA.>.>aIIIJ J J J J J J J J J J J J J J ""4#899 J J--AA.>.>aIIIJ J J J J J J J J J J J J J J ''55%**55555C""4#899 O O--uclUH<MNNNO O O O O O O O O O O O O O O5	O 	O 	O 	O 	O 	O 	O 	O 	O 	O 	O 	O 	O 	O 	O 	O 	O 	Os   B4J/C-!J/-C1	1J/4C1	5J/D9-J/9D=	=J/ D=	J/F9J/F			J/F		J/*GJ/G	J/G	J/7HJ/H#	#J/&H#	'A	J/0JJ/J	J/J	J//J36J3c           	          di i fg g ft                      t                      ft                      t                      fg}|D ]\  }}	 |                     ||           n,# | j        $ r |                     d|d|d           Y nw xY w	 |                     ||d           n,# | j        $ r |                     d|d|d           Y nw xY w	 |                     ||d           # | j        $ r |                     d|d|d           Y w xY wd	g fi t                      ft          d
dg          t          d
dg          ft          d
dg          t          ddg          ft          dd
g          t          dd
g          fg}|D ]n\  }}|                     | j        | j        ||           |                     | j        | j        ||d           |                     | j        | j        ||d           od S )N)r   r   zassertEqual(z, z) failedr   rr  z) with msg= failedz) with third parameter failedr   r  rf   rI      rH   )set	frozensetrJ   rM   r^   rL   )r   equal_pairsrp  rq  unequal_pairss        r   testAssertEqualzTest_TestCase.testAssertEqual  s   RRikk*,   	" 	"DAqA  A&&&&( A A A			!!!QQQ?@@@@@AK  A5 1111( K K K			AAAqqqIJJJJJK"  Au----( " " "			11aaa! " " " " ""
 BxCEE{QqE

Iqe,,-1Q%  #qe**-QqE

C1JJ') " 	) 	)DAqd3T5Eq!LLLd3T5Eq!#% % %d3T5Eq!"'  ) ) ) )		) 	)s6   A&BBB%%&CCC**&DDc                    |                      g g            |                     dd           |                     g d           ddg g}g }|                     t          j        j        | j         ||           |                     t          j        j        | j         t          |          t          |                     |                     t          j        j        | j        |t          |                     |                    |           |                      ||           |                     t          |          t          |                     |                     |t          |                     |                     t          |          |           |                     | j        | j         |t          |                     |                     | j        | j        t          |          |           |                     | j        | j         d |           |                     | j        | j        d t          |                     |                     | j        | j        d t          |                     |                     | j        | j         dd           |                     | j        | j        dd           |                     | j        | j        dd           | 	                    i i            ddi}i }|                     t          j        j        | j	        ||           |
                    |           | 	                    ||           d|d<   |                     t          j        j        | j	        ||d           |                     | j        | j	        d |           |                     | j        | j	        g |           |                     | j        | j	        dd           d S )Nr   r   rp  rf   r  zThese are unequal)assertListEqualassertTupleEqualassertSequenceEqualrL   r:   r;   rM   tupleextendassertDictEqualupdate)r   rp  rq  r  r  s        r   testEqualityzTest_TestCase.testEquality  s   R$$$b"%%%  R(((RL(+<.1	6 	6 	6(+<.a%((	D 	D 	D(+<2AuQxx	A 	A 	A 	
Q"""eAhha111  E!HH---  q1---$/1EU1XX	' 	' 	'$/1F((A	' 	' 	'$/1EtQOOO$/1F((	$ 	$ 	$$/1Ia	* 	* 	*$/1Eq!LLL$/1F1MMM$/1IQ	  	  	  	R$$$1J(+<.1	6 	6 	6 	
Q"""#(+<.16I	K 	K 	K 	$/1EtQOOO$/1Er1MMM$/1Eq!LLLLLr   c                 z   |                      | j        d           dddz  z   }dddz  z   }d                    t          j        t          j        |                                          t          j        |                                                              }t          j	        j
        t          |          dz   fz  }t          |          dz  | _        	 |                     ||           |                     d	           n$# | j        $ r}|j        d
         }Y d }~nd }~ww xY w|                     t          |          t          |                     |                     ||           t          |          dz  | _        	 |                     ||           |                     d	           n$# | j        $ r}|j        d
         }Y d }~nd }~ww xY w|                     t          |          t          |                     |                     ||           d | _        	 |                     ||           |                     d	           n$# | j        $ r}|j        d
         }Y d }~nd }~ww xY w|                     t          |          t          |                     |                     ||           d S )Ni  rp  r  i   rq  
rf   rI   z!assertSequenceEqual did not fail.r   )rJ   maxDiffr  difflibndiffpprintpformat
splitlinesr:   caseDIFF_OMITTEDlenr  r^   rM   args
assertLessr   assertGreaterr  )r   seq1seq2diffomittederr  s          r   testAssertSequenceEqualMaxDiffz,Test_TestCase.testAssertSequenceEqualMaxDiff?  s   t,,,S5[ S5[ yyv~d';';'F'F'H'H'-~d';';'F'F'H'HJ J K K -,D		A/??4yy!|	;$$T4000 II9:::: $ 	 	 	&)CCCCCC	 	C#d)),,,gs###4yy1}	;$$T4000 II9:::: $ 	 	 	&)CCCCCC	 	3s88SYY///#&&&	;$$T4000 II9:::: $ 	 	 	&)CCCCCC	 	3s88SYY///#&&&&&sH   D 
D&D!!D&F3 3
G=GG%I 
I2I--I2c                    d| _         |                     dd          }t          j        j        t          d          z  }|                     |d|z              d | _         |                     dd          }|                     |d           d| _         |                     dd          }|                     |d           d S )Nrf   r   barfoobarr  )r  _truncateMessager:   r  r  r  rJ   )r   messager  s      r   testTruncateMessagez!Test_TestCase.testTruncateMessageg  s    ''u55-,s5zz9%'/222''u55(+++''u55(+++++r   c                    t          j        d          }d }||_        	 |                    i ddi           |                     d           d S # | j        $ r.}|                     t          |          d           Y d }~d S d }~ww xY w)NrJ   c                     dS r9  r   rr  r  s     r   truncatez<Test_TestCase.testAssertDictEqualTruncates.<locals>.truncatew      5r   rf   r   zassertDictEqual did not failr   )r:   r;   r  r  r^   rM   rJ   r   r   r+   r  r  s       r   testAssertDictEqualTruncatesz*Test_TestCase.testAssertDictEqualTruncatesu  s     //	 	 	 (	6  aV,,, II455555 $ 	, 	, 	,SVVU+++++++++	,s   A 
B#BBc                    t          j        d          }d }||_        	 |                    dd           |                     d           d S # | j        $ r.}|                     t          |          d           Y d }~d S d }~ww xY w)NrJ   c                     dS r9  r   r  s     r   r  zATest_TestCase.testAssertMultiLineEqualTruncates.<locals>.truncate  r  r   r   r  z!assertMultiLineEqual did not fail)r:   r;   r  assertMultiLineEqualr^   rM   rJ   r   r  s       r   !testAssertMultiLineEqualTruncatesz/Test_TestCase.testAssertMultiLineEqualTruncates  s     //	 	 	 (	;%%eU333 II9::::: $ 	, 	, 	,SVVU+++++++++	,s   A 
B#B  Bc                                            j        d           d  _         j        d _                              fd           d}                      j                  5 }                      |dz   |dz              d d d            n# 1 swxY w Y                        dt          |j                                                   |dz   |dz              d}d	 } j	        | _	                              fd
           |dz   |dz   }}                      j                  5 }                      ||           d d d            n# 1 swxY w Y    
                    dt          |j                                                   t          |j                  |d|                                 |dz   |dz              d S )Ni       c                  &    t          d           S N_diffThresholdsetattrold_thresholdr   s   r   <lambda>z=Test_TestCase.testAssertEqual_diffThreshold.<locals>.<lambda>      .> N N r   xxxxxxxxxxxxxxxxrp  rq  ^@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxc                      t          d          )Nzthis should not be raised)SystemError)r  r  s     r   explodingTruncationzHTest_TestCase.testAssertEqual_diffThreshold.<locals>.explodingTruncation  s    9:::r   c                  &    t          d           S )Nr  r  )old_truncater   s   r   r  z=Test_TestCase.testAssertEqual_diffThreshold.<locals>.<lambda>  s    .@, O O r   z != )rJ   r  r  
addCleanuprL   rM   r   r   	exceptionr  r  )r   scmr  rw  rx  r  r  s   `     @@r   testAssertEqual_diffThresholdz+Test_TestCase.testAssertEqual_diffThreshold  sd   ,e444 +"NNNNNOOO t455 	/QWa#g...	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/c3r|,,---S!c'*** 	; 	; 	;, 3OOOOOPPPS!c'Bt455 	%R$$$	% 	% 	% 	% 	% 	% 	% 	% 	% 	% 	% 	% 	% 	% 	%c",//000R\**"""bb,ABBBS!c'*****s$   )BBB1EEEc                      j         d _                               fd           d}|dz   |dz   }}                      j                  5 }                     ||           d d d            n# 1 swxY w Y   d}                     t          |j                  d|d|d	                                |dz   |dz              d
}|dz   |z   |dz   |z   }}                      j                  5 }                     ||           d d d            n# 1 swxY w Y   d}                     t          |j                  d|d|d|d|d	           d}|dz   |z   |dz   |z   }}                      j                  5 }                     ||           d d d            n# 1 swxY w Y   d}d}                     t          |j                  d|d|d|d|d	           d S )Nr   c                  &    t          d           S r  r  r  s   r   r  z7Test_TestCase.testAssertEqual_shorten.<locals>.<lambda>  r  r   dxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxrp  rq  zKxxxx[35 chars]xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'za' != 'zb'2yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyzxxxx[85 chars]xxxxxxxxxxxz' != 'dyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyzxxxx[91 chars]xxxxxz6yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy[56 chars]yyyy)r  r  rL   rM   rJ   r   r  )	r   r  rw  rx  r  r  pr  r  s	   `       @r   testAssertEqual_shortenz%Test_TestCase.testAssertEqual_shorten  s   +NNNNNOOOS!c'Bt455 	%R$$$	% 	% 	% 	% 	% 	% 	% 	% 	% 	% 	% 	% 	% 	% 	%'R\***111,EFFFS!c'***S1a#gkBt455 	%R$$$	% 	% 	% 	% 	% 	% 	% 	% 	% 	% 	% 	% 	% 	% 	%'R\***AAAqqq!!!QQQ,OPPPS1a#gkBt455 	%R$$$	% 	% 	% 	% 	% 	% 	% 	% 	% 	% 	% 	% 	% 	% 	%!'R\***AAAqqq!!!QQQ,OPPPPPs6   A33A7:A77DD!DF++F/2F/c                    t                      }|                     g dg d           |                     g dg d           |                     ||dddg|dd|df           |                     g dg d           |                     | j        | j        d	dgdgd
z  z   d	gd
z  ddgz              |                     | j        | j        g dg d           |                     | j        | j        dgddg           |                     | j        | j        ddgdg           |                     | j        | j        g dddg           |                     d	dgddgdgdddgd	dgg           |                     t	          d	dg ddg          t	          d	dg ddg                     |                     | j        | j        g t
          dd	ddt                      g           |                     dd	iddigddidd	ig           |                     d	dt
          g gt
          g dd	g           |                     | j        | j        g t
          g dd	ddt                      g           |                     | j        | j        d	ggdgg           |                     | j        | j        g ddd	g           |                     | j        | j        g dg d           |                     | j        | j        d	ddid dgddidd g           ddhd	dhg}|d d d         }|                     ||           t          t          j	        
                    dd                    }h d}|                     ||           t          j	        
                    g gg           }|                     |d	dg fg           t          t          j	                            dd                    }h d}|                     ||           d S )Nr   )rH   rI   rf   )r   r  baz)r  r   r   rI   rH   )rf   2rp  rp  )rp  r  Trp  rf   d   )rp  r  Trf   
      )r  r  r  r  r   Fr  y              @y               @rp  rq  )rf   rf   rI   )rf   rf   r  rp  rp  )r  r  Trp  Taaabccdabbbcce>   r   rf   r  rf   r   r  rf   rH   rq  rH   rf   rp  )rt  assertCountEqualrL   rM   iterdivmodr  r  r:   util_count_diff_all_purposerJ   _count_diff_hashable)r   rp  rq  diffsr   s        r   testAssertCountEqualz"Test_TestCase.testAssertCountEqual  s   HHiii3333335J5J5JKKKq!Q1o1aA???0002G2G2GHHH$/1Fa&A39,qcCi1a&.@	B 	B 	B$/1F,,,.A.A.A	C 	C 	C$/1F$R	* 	* 	*$/1Fr(RD	* 	* 	*$/1F&,,R	2 	2 	2 	1v1vq1EAq6Aq63JKKKdAq"a#344"Aq"a#344	6 	6 	6 	$/1FvsAr2y{{C	E 	E 	E 	Qx#q2c1XQx4HIIIq#vr2VRa4HIII$/1Fvr32r355A	C 	C 	C$/1F3%1#	( 	( 	( 	$/1F#))aV	- 	- 	-$/1F///1F1F1F	H 	H 	H$/1FsAhd3sAhd5K	M 	M 	M
 UQqENdddGa### HM99)YOOPP???)))55rdB??!Q---HM66y)LLMM???)))))r   c                    t                      }t                      }|                     ||           |                     | j        | j        d |           |                     | j        | j        g |           |                     | j        | j        |d            |                     | j        | j        |g            t          dg          }t                      }|                     | j        | j        ||           t          dg          }t          dg          }|                     ||           t          dg          }t          ddg          }|                     | j        | j        ||           t          dg          }t	          ddg          }|                     | j        | j        ||           t          ddg          }t	          ddg          }|                     ||           t                      }d}|                     | j        | j        ||           |                     | j        | j        ||           t          ddg          }t          dg          }|                     | j        | j        ||           d S )Nrp  rq  r   )r   rf   r   )r  r  )r  assertSetEqualrL   rM   r  )r   set1set2s      r   testAssertSetEqualz Test_TestCase.testAssertSetEqual  sU   uuuuD$'''$/1DdDQQQ$/1Db$OOO$/1DdDQQQ$/1DdBOOOC5zzuu$/1DdDQQQC5zzC5zzD$'''C5zzC:$/1DdDQQQC5zz#s$$$/1DdDQQQC:#s$$D$'''uu$/1DdDQQQ$/1DdDQQQ FF#$$F8}}$/1DdDQQQQQr   c                 
   |                      dd           |                     dd           |                     dd           |                     dd           |                     dd           |                     dd           |                     | j        | j         dd           |                     | j        | j         dd           |                     | j        | j        dd           |                     | j        | j        dd           |                     | j        | j        dd           |                     | j        | j        dd           |                      dd           |                     dd           |                     dd           |                     dd           |                     dd           |                     dd           |                     | j        | j         dd           |                     | j        | j         dd           |                     | j        | j        dd           |                     | j        | j        dd           |                     | j        | j        dd           |                     | j        | j        dd           |                      dd           |                     dd           |                     dd           |                     dd           |                     dd           |                     dd           |                     | j        | j         dd           |                     | j        | j         dd           |                     | j        | j        dd           |                     | j        | j        dd           |                     | j        | j        dd           |                     | j        | j        dd           |                      dd           |                     dd           |                     dd           |                     dd           |                     dd           |                     dd           |                     | j        | j         dd           |                     | j        | j         dd           |                     | j        | j        dd           |                     | j        | j        dd           |                     | j        | j        dd           |                     | j        | j        dd           d S )	NrI   rf   g?g      ?bugants   bugs   ant)r  assertGreaterEqualr  assertLessEqualrL   rM   r   s    r   testInequalityzTest_TestCase.testInequality4  s   1a   1%%%1%%%1Q"""Q"""$/1CQJJJ$/1CQJJJ$/1H!QOOO$/!QGGG$/!QGGG$/1Eq!LLL 	3$$$S)))S)))S!!!S#&&&S#&&&$/1CS#NNN$/1CS#NNN$/1H#sSSS$/#sKKK$/#sKKK$/1EsCPPP 	5%(((u---u---u%%%UE***UE***$/1CUERRR$/1CUERRR$/1H%QVWWW$/%OOO$/%OOO$/1EueTTT 	66***//////'''VV,,,VV,,,$/1CVVTTT$/1CVVTTT$/1H& 	" 	" 	"$/&&QQQ$/&&QQQ$/1EvvVVVVVr   c                     d}d}d}d | _         	 |                     ||           d S # | j        $ rJ}t          |                              dd          d         }|                     ||           Y d }~d S d }~ww xY w)Nzxhttp://www.python.org/doc/2.3/lib/module-unittest.html
test case
    A test case is the smallest unit of testing. [...]
zhttp://www.python.org/doc/2.4.1/lib/module-unittest.html
test case
    A test case is the smallest unit of testing. [...] You may provide your
    own implementation that does not subclass from TestCase, of course.
a  - http://www.python.org/doc/2.3/lib/module-unittest.html
?                             ^
+ http://www.python.org/doc/2.4.1/lib/module-unittest.html
?                             ^^^
  test case
-     A test case is the smallest unit of testing. [...]
+     A test case is the smallest unit of testing. [...] You may provide your
?                                                       +++++++++++++++++++++
+     own implementation that does not subclass from TestCase, of course.
r  rf   )r  r  rM   r   splitrJ   r   sample_textrevised_sample_textsample_text_errorr  errors         r   testAssertMultiLineEqualz&Test_TestCase.testAssertMultiLineEqualn  s    

 	7%%k3FGGGGG$ 	7 	7 	7FFLLq))!,E.666666666	7s   ' 
A;?A66A;c                     d}d}d}	 |                      ||           d S # | j        $ rJ}t          |                              dd          d         }|                      ||           Y d }~d S d }~ww xY w)Nzladen swallows fly slowlyzunladen swallows fly quicklyzr- laden swallows fly slowly
?                    ^^^^
+ unladen swallows fly quickly
? ++                   ^^^^^
r  rf   )rJ   rM   r   r   r!  s         r   testAssertEqualSingleLinez'Test_TestCase.testAssertEqualSingleLine  s    1<	7[*=>>>>>$ 	7 	7 	7FFLLq))!,E.666666666	7s     
A4?A//A4c                 >    t           j        j        r fd}nd } |            5                        j                  5                       dd           d d d            n# 1 swxY w Y   d d d            n# 1 swxY w Y    |            5                       dd           d d d            n# 1 swxY w Y   ddg}ddg} |            5                        j                  5                       ||           d d d            n# 1 swxY w Y   d d d            n# 1 swxY w Y    |            5                        j                  5                       t          |          t          |                     d d d            n# 1 swxY w Y   d d d            n# 1 swxY w Y    |            5                        j                  5   
                    |t          |                     d d d            n# 1 swxY w Y   d d d            n# 1 swxY w Y    |            5                        j                  5   
                    t          |          |           d d d            n# 1 swxY w Y   d d d            n# 1 swxY w Y    |            5                        j                  5   
                    dd           d d d            n# 1 swxY w Y   d d d            n# 1 swxY w Y    |            5                        j                  5                       t          |          t          |                     d d d            n# 1 swxY w Y   d d d            n# 1 swxY w Y                         j                  5                       |t          |                     d d d            n# 1 swxY w Y                         j                  5                       t          |          |           d d d            n# 1 swxY w Y   ddg}dg}                      j                  5                       ||           d d d            n# 1 swxY w Y                         j                  5                       t          |          t          |                     d d d            n# 1 swxY w Y                         j                  5   
                    |t          |                     d d d            n# 1 swxY w Y                         j                  5   
                    t          |          |           d d d            n# 1 swxY w Y                         j                  5                       t          |          t          |                     d d d            n# 1 swxY w Y   dg}ddg}                      j                  5                       ||           d d d            n# 1 swxY w Y                         j                  5                       t          |          t          |                     d d d            n# 1 swxY w Y                         j                  5   
                    |t          |                     d d d            n# 1 swxY w Y                         j                  5   
                    t          |          |           d d d            n# 1 swxY w Y                         j                  5                       t          |          t          |                     d d d            n# 1 swxY w Y    |            5                        j                  5                       ddiddi           d d d            n# 1 swxY w Y   d d d            n# 1 swxY w Y                         j                  5                       i ddi           d d d            n# 1 swxY w Y                         j                  5                       ddii            d d d            n# 1 swxY w Y                         j                  5                       ddgg d           d d d            n# 1 swxY w Y    |            5                       ddgddg           d d d            n# 1 swxY w Y    |            5                        j                  5                       ddgddg           d d d            n# 1 swxY w Y   d d d            n# 1 swxY w Y    |            5                        j                  5                       ddg gddg g           d d d            n# 1 swxY w Y   d d d            d S # 1 swxY w Y   d S )Nc                  :                          t          d          S )Nz#Comparison between bytes and string)assertWarnsRegexBytesWarningr   s   r   bytes_warningz=Test_TestCase.testEqualityBytesWarning.<locals>.bytes_warning  s#    ,,\AC C Cr   c                  (    t          j                    S r   )
contextlib	ExitStackr   r   r   r-  z=Test_TestCase.testEqualityBytesWarning.<locals>.bytes_warning  s    !+---r   rp     ar   )r1  r1  r1  )sysflagsr-  rL   rM   rJ   assertNotEqualr  r  r  r  r  r  r  r  )r   r-  rp  rq  s   `   r   testEqualityBytesWarningz&Test_TestCase.testEqualityBytesWarning  s   9" 	.C C C C C C. . . ]__ 	( 	(d//0EFF 	( 	(S$'''	( 	( 	( 	( 	( 	( 	( 	( 	( 	( 	( 	( 	( 	( 	( 	( 	( 	( 	( 	( 	( 	( 	( 	( 	( 	( 	( 	( 	( 	(]__ 	+ 	+T***	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ HI]__ 	' 	'd//0EFF 	' 	'  A&&&	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	']__ 	6 	6d//0EFF 	6 	6!!%((E!HH555	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6]__ 	2 	2d//0EFF 	2 	2$$Qa111	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2]__ 	2 	2d//0EFF 	2 	2$$U1XXq111	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2]__ 	0 	0d//0EFF 	0 	0$$S$///	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0]__ 	0 	0d//0EFF 	0 	0AA///	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 t455 	. 	.  E!HH---	. 	. 	. 	. 	. 	. 	. 	. 	. 	. 	. 	. 	. 	. 	.t455 	/ 	/!!%((A...	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ ICt455 	' 	'  A&&&	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	't455 	6 	6!!%((E!HH555	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6t455 	2 	2$$Qa111	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2t455 	2 	2$$U1XXq111	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2t455 	0 	0AA///	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 CIt455 	' 	'  A&&&	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	't455 	6 	6!!%((E!HH555	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6t455 	2 	2$$Qa111	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2t455 	2 	2$$U1XXq111	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2t455 	0 	0AA///	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 ]__ 	6 	6d//0EFF 	6 	6  #qD!9555	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6t455 	0 	0  dAY///	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0t455 	0 	0  $B///	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 t455 	D 	D!!4,0B0B0BCCC	D 	D 	D 	D 	D 	D 	D 	D 	D 	D 	D 	D 	D 	D 	D]__ 	< 	<!!3+T{;;;	< 	< 	< 	< 	< 	< 	< 	< 	< 	< 	< 	< 	< 	< 	<]__ 	< 	<d//0EFF 	< 	<!!3*tTl;;;	< 	< 	< 	< 	< 	< 	< 	< 	< 	< 	< 	< 	< 	< 	< 	< 	< 	< 	< 	< 	< 	< 	< 	< 	< 	< 	< 	< 	< 	<]__ 	D 	Dd//0EFF 	D 	D!!3R.4r2BCCC	D 	D 	D 	D 	D 	D 	D 	D 	D 	D 	D 	D 	D 	D 	D 	D 	D 	D 	D 	D 	D 	D 	D 	D 	D 	D 	D 	D 	D 	D 	D 	D 	DsM  A;A$A;$A(	(A;+A(	,A;;A?A?B33B7:B7D%+DD%D	D%D	D%%D),D):F)1FF)F	F)F	F))F-0F->H $H	=H 	H	H H	H  H$'H$5J$J 4J J	JJ	JJJ,LK*L*K.	.L1K.	2LLLN11M."N.M2	2N5M2	6NN	N	*$OO!O?$P//P36P3Q>>RR#1S  S$'S$$T55T9<T9$V

VV/1W,,W03W0X;;X?X? 1ZZ!$Z!$[22[69[6$]]],1^))^-0^->`` 4` `	``	```<a!!a%(a%b++b/2b/c77c;>c;d33d7:d7f!#f
>f!
f	f!f	f!!f%(f%6hg:.h:g>	>hg>	hhhc                     |                      d            |                     | j        | j         d           |                     d           |                     | j        | j        d            d S )NFzDjZoPloGears on Rails)ra  rL   rM   assertIsNotNoner   s    r   testAssertIsNonezTest_TestCase.testAssertIsNone  sm    $$/1BEJJJ4555$/1EtLLLLLr   c                 v    |                      dd           |                     | j        | j         dd           d S )N
asdfabasdfzab+saaasaaaa)assertRegexrL   rM   r   s    r   testAssertRegexzTest_TestCase.testAssertRegex  sI    v...$/1A!7	, 	, 	, 	, 	,r   c                     G d dt                     fd}|                     |           |                     t          f|           |                     t          t          dd           |                     | j                  5  |                     d            d d d            n# 1 swxY w Y   |                     t
                    5  |                     d            d d d            n# 1 swxY w Y   |                               5  |                     t          |           d d d            d S # 1 swxY w Y   d S )Nc                       e Zd ZdS )=Test_TestCase.testAssertRaisesCallable.<locals>.ExceptionMockNr   r   r    r   r   r   ExceptionMockrA            Dr   rC  c                        d          N	We expectr   rC  s   r   Stubz4Test_TestCase.testAssertRaisesCallable.<locals>.Stub      -,,,r   19   basec                      dS Nr   r   r   r   r   r  z8Test_TestCase.testAssertRaisesCallable.<locals>.<lambda>       Q r   )	ExceptionrL   r_   intrM   	TypeErrorr   rI  rC  s     @r   testAssertRaisesCallablez&Test_TestCase.testAssertRaisesCallable  s)   	 	 	 	 	I 	 	 		- 	- 	- 	- 	--...:}5t<<<*c4a888t455 	8 	8mYY777	8 	8 	8 	8 	8 	8 	8 	8 	8 	8 	8 	8 	8 	8 	8 y)) 	3 	3mT222	3 	3 	3 	3 	3 	3 	3 	3 	3 	3 	3 	3 	3 	3 	3 }-- 	0 	0j$///	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0s6   
B..B25B2C66C:=C:D??EEc                     G d dt                     fd}|                               5   |             d d d            n# 1 swxY w Y   |                     t          f          5 } |             d d d            n# 1 swxY w Y   |                     |j                   |                     |j        j        d         d           |                     t                    5  t          dd           d d d            n# 1 swxY w Y   |                     | j                  5  |                               5  	 d d d            n# 1 swxY w Y   d d d            n# 1 swxY w Y   | 	                    | j        d	          5  |                     d	
          5  	 d d d            n# 1 swxY w Y   d d d            n# 1 swxY w Y   | 	                    t          d	          5  |                     d          5  	 d d d            n# 1 swxY w Y   d d d            n# 1 swxY w Y   |                               5  |                     t          |           d d d            d S # 1 swxY w Y   d S )Nc                       e Zd ZdS )<Test_TestCase.testAssertRaisesContext.<locals>.ExceptionMockNrB  r   r   r   rC  rY  	  rD  r   rC  c                        d          rF  r   rH  s   r   rI  z3Test_TestCase.testAssertRaisesContext.<locals>.Stub  rJ  r   r   rG  rK  rL  rM  r  r  *   r  )rR  rL   r_   rI  r  rJ   r  rS  rM   assertRaisesRegexrT  )r   rI  r  rC  s      @r   testAssertRaisesContextz%Test_TestCase.testAssertRaisesContext  s   	 	 	 	 	I 	 	 		- 	- 	- 	- 	-}-- 	 	DFFF	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 
M:;; 	rDFFF	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	blM:::*1-{;;;z** 	 	1	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 t455 	 	""=11                	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 ##D$98DD 	 	""=h"??                	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 ##Ix88 	 	""="<<                	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 }-- 	0 	0j$///	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0s   AA
A
-BBB*DDD-E(EE(E	E(E	E((E,/E,G&F4(G4F8	8G;F8	<GGG1H.	HH.H	H.H	H..H25H2I77I;>I;c                    |                      t                    5  |                                   d d d            n# 1 swxY w Y   |                      t                    5  |                      d           d d d            n# 1 swxY w Y   |                      t                    5  |                      t                     d d d            n# 1 swxY w Y   |                      t                    5  |                      t          df           d d d            n# 1 swxY w Y   |                      t                    5  |                      t          t          f           d d d            d S # 1 swxY w Y   d S r   )rL   rT  rt  r_   r   s    r   testAssertRaisesNoExceptionTypez-Test_TestCase.testAssertRaisesNoExceptionType(  s   y)) 	  	 	  	  	  	  	  	  	  	  	  	  	  	  	  	  	 y)) 	! 	!a   	! 	! 	! 	! 	! 	! 	! 	! 	! 	! 	! 	! 	! 	! 	!y)) 	& 	&f%%%	& 	& 	& 	& 	& 	& 	& 	& 	& 	& 	& 	& 	& 	& 	&y)) 	/ 	/z1o...	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/y)) 	4 	4z62333	4 	4 	4 	4 	4 	4 	4 	4 	4 	4 	4 	4 	4 	4 	4 	4 	4 	4sW   <A A !BB
B(CCC4DD!$D!"E11E58E5c                     d }t          j        |          }|                     t          |           |                     |t          j        |                     d S )Nc                  <    	 t           # t           $ r t           w xY wr   )r_   r   r   r   funcz4Test_TestCase.testAssertRaisesRefcount.<locals>.func7  s.    !   ! ! !  !s   	 )r2  getrefcountrL   r_   rJ   )r   rc  refcounts      r   testAssertRaisesRefcountz&Test_TestCase.testAssertRaisesRefcount4  s^    	! 	! 	! ?4((*d+++3?4#8#899999r   c                 L    G d dt                     fd}|                     t          j        d          |           |                     d|           |                     t
                    5  |                     dd            d d d            d S # 1 swxY w Y   d S )Nc                       e Zd ZdS ):Test_TestCase.testAssertRaisesRegex.<locals>.ExceptionMockNrB  r   r   r   rC  ri  B  rD  r   rC  c                        d          rF  r   rH  s   r   rI  z1Test_TestCase.testAssertRaisesRegex.<locals>.StubE  rJ  r   zexpect$)rR  r]  recompilerL   rT  rU  s     @r   testAssertRaisesRegexz#Test_TestCase.testAssertRaisesRegexA  s&   	 	 	 	 	I 	 	 		- 	- 	- 	- 	- 	}bj.C.CTJJJ}i>>>y)) 	C 	C""=)TBBB	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	Cs   4BB Bc           	      x   |                      | j        d| j         t          t          j        d          d            |                      | j        d| j         t          dd            |                      | j        d          5  |                      t          dd          5  	 d d d            n# 1 swxY w Y   d d d            n# 1 swxY w Y   |                      t
          d          5  |                      t          dd	          5  	 d d d            n# 1 swxY w Y   d d d            d S # 1 swxY w Y   d S )
Nz"^Exception not raised by <lambda>$r  c                      d S r   r   r   r   r   r  z8Test_TestCase.testAssertNotRaisesRegex.<locals>.<lambda>Q       r   c                      d S r   r   r   r   r   r  z8Test_TestCase.testAssertNotRaisesRegex.<locals>.<lambda>U  rp  r   r  expectr  r[  r\  )r]  rM   rR  rk  rl  rT  r   s    r   testAssertNotRaisesRegexz&Test_TestCase.testAssertNotRaisesRegexM  s>   %'K&	2:c??	 	 	 	%'K&	3	 	 	
 ##D$98DD 	 	''	8'JJ                	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 ##Ix88 	 	''	8B'GG                	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	sl   C B."C.B2	2C5B2	6CC	C	+D/	DD/D	D/D	D//D36D3c                 r     G d dt                     }|                     t          | j        |d            d S )Nc                       e Zd ZdS )>Test_TestCase.testAssertRaisesRegexInvalidRegex.<locals>.MyExcNrB  r   r   r   MyExcrv  a  rD  r   rw  c                      dS NTr   r   r   r   r  zATest_TestCase.testAssertRaisesRegexInvalidRegex.<locals>.<lambda>c      D r   )rR  rL   rT  r]  )r   rw  s     r   !testAssertRaisesRegexInvalidRegexz/Test_TestCase.testAssertRaisesRegexInvalidRegex_  sQ    	 	 	 	 	I 	 	 	)T%;ULLQQQQQr   c                 r     G d dt                     }|                     t          | j        |d            d S )Nc                       e Zd ZdS )>Test_TestCase.testAssertWarnsRegexInvalidRegex.<locals>.MyWarnNrB  r   r   r   MyWarnr~  g  rD  r   r  c                      dS ry  r   r   r   r   r  z@Test_TestCase.testAssertWarnsRegexInvalidRegex.<locals>.<lambda>i  rz  r   )WarningrL   rT  r+  )r   r  s     r    testAssertWarnsRegexInvalidRegexz.Test_TestCase.testAssertWarnsRegexInvalidRegexe  sQ    	 	 	 	 	W 	 	 	)T%:FLLQQQQQr   c                 &    G d dt           j                  } |d          t          j        d<   	 |                     t
          t          j        d           t          j        d= t          j        d= d S # t          j        d= t          j        d= w xY w)Nc                   $    e Zd Zed             ZdS ):Test_TestCase.testAssertWarnsModifySysModules.<locals>.Fooc                 $    dt           j        d<   d S )Nr  @bar@)r2  modulesr   s    r   __warningregistry__zNTest_TestCase.testAssertWarnsModifySysModules.<locals>.Foo.__warningregistry__n  s    ',G$$$r   N)r   r   r    propertyr  r   r   r   r!   r  m  s-        - - X- - -r   r!   r   z@foo@r   r  )types
ModuleTyper2  r  r   UserWarningr  warnrh   s     r   testAssertWarnsModifySysModulesz-Test_TestCase.testAssertWarnsModifySysModulesk  s    	- 	- 	- 	- 	-%" 	- 	- 	-
  #s5zzG	%[(-DDDG$G$$$ G$G$$$$$s   &A4 4Bc           	          d }|                      | j        d| j         t          d|           |                      | j        d| j         t          t          j        d          |           d S )Nc                       t          d          N
Unexpected)rR  r   r   r   rI  z9Test_TestCase.testAssertRaisesRegexMismatch.<locals>.Stubz  s    L)))r   z*"\^Expected\$" does not match "Unexpected"z
^Expected$)r]  rM   rR  rk  rl  )r   rI  s     r   testAssertRaisesRegexMismatchz+Test_TestCase.testAssertRaisesRegexMismatchy  s    	* 	* 	* 	%=&	<		 	 	
 	%=&	
<(($		0 	0 	0 	0 	0r   c                 ,    G d dt                     fd}d}|                               }|5   ||           d d d            n# 1 swxY w Y   |j        }|                     |           |                     |j        d         |           d S )Nc                       e Zd ZdS )=Test_TestCase.testAssertRaisesExcValue.<locals>.ExceptionMockNrB  r   r   r   rC  r    rD  r   rC  c                      |           r   r   )r   rC  s    r   rI  z4Test_TestCase.testAssertRaisesExcValue.<locals>.Stub  s    -$$$r   zparticular valuer   )rR  rL   r  rI  rJ   r  )r   rI  vctxr  rC  s        @r   testAssertRaisesExcValuez&Test_TestCase.testAssertRaisesExcValue  s   	 	 	 	 	I 	 	 		% 	% 	% 	% 	%.. 	 	DGGG	 	 	 	 	 	 	 	 	 	 	 	 	 	 	Ma///A&&&&&s   AAAc                    |                      t                    5  |                                  d d d            n# 1 swxY w Y   |                      t                    5  |                     t                     d d d            n# 1 swxY w Y   |                      t                    5  |                     dd           d d d            n# 1 swxY w Y   |                      t                    5  |                     t          d           d d d            n# 1 swxY w Y   |                      t                    5  |                     t          dfd           d d d            n# 1 swxY w Y   |                      t                    5  |                     t          t          fd           d d d            d S # 1 swxY w Y   d S Nrf   rr  )rL   rT  r]  r_   rt  r   s    r   $testAssertRaisesRegexNoExceptionTypez2Test_TestCase.testAssertRaisesRegexNoExceptionType  s"   y)) 	% 	%""$$$	% 	% 	% 	% 	% 	% 	% 	% 	% 	% 	% 	% 	% 	% 	%y)) 	/ 	/"":...	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/y)) 	0 	0""1h///	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0y)) 	5 	5""68444	5 	5 	5 	5 	5 	5 	5 	5 	5 	5 	5 	5 	5 	5 	5y)) 	> 	>""J?H===	> 	> 	> 	> 	> 	> 	> 	> 	> 	> 	> 	> 	> 	> 	>y)) 	C 	C""J#7BBB	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	Csi   <A A !BBB-CCC5DD!$D!E,,E03E0#GGGc                    d }|                      t          |           |                      t          |           |                      t          t          f|           |                      t          t          j        dt                     |                     | j                  5  |                      t          d            d d d            n# 1 swxY w Y   |                     t                    5  |                      t          d            d d d            n# 1 swxY w Y   t          j                    5  t          j	        dt                     |                     | j                  5  |                      t          |           d d d            n# 1 swxY w Y   d d d            n# 1 swxY w Y   t          j                    5  t          j	        dt                     |                     t                    5  |                      t          |           d d d            n# 1 swxY w Y   d d d            d S # 1 swxY w Y   d S )Nc                  :    t          j        dt                     d S r9  r  r  RuntimeWarningr   r   r   _runtime_warnz<Test_TestCase.testAssertWarnsCallable.<locals>._runtime_warn      M%00000r   r   categoryc                      dS rP  r   r   r   r   r  z7Test_TestCase.testAssertWarnsCallable.<locals>.<lambda>  rQ  r   defaultr%  )
r   r  r   r  r  rL   rM   rT  r  r  r   r  s     r   testAssertWarnsCallablez%Test_TestCase.testAssertWarnsCallable  s   	1 	1 	1 	777777,n=}MMM! 	 	H 	H 	H t455 	8 	8^YY777	8 	8 	8 	8 	8 	8 	8 	8 	8 	8 	8 	8 	8 	8 	8 y)) 	3 	3^T222	3 	3 	3 	3 	3 	3 	3 	3 	3 	3 	3 	3 	3 	3 	3 $&& 	D 	D!)^<<<""4#899 D D  !3]CCCD D D D D D D D D D D D D D D	D 	D 	D 	D 	D 	D 	D 	D 	D 	D 	D 	D 	D 	D 	D $&& 	D 	D!'>:::"">22 D D  !3]CCCD D D D D D D D D D D D D D D	D 	D 	D 	D 	D 	D 	D 	D 	D 	D 	D 	D 	D 	D 	D 	D 	D 	Ds   #CCC1DD D75F+,FF+F	F+F	F++F/2F/	5H>>H&H>&H*	*H>-H*	.H>>IIc                    d }t          j        |          d         }|                     t                    5 } |             d d d            n# 1 swxY w Y   |                     t          t          f          5 } |             d d d            n# 1 swxY w Y   |                     |j        t                     |                     |j        j        d         d           | 	                    d|j
                   |                     |j        |dz              |                     t                    5   |              |             d d d            n# 1 swxY w Y   |                     t                    5  t          j        dt                     d d d            n# 1 swxY w Y   |                     | j                  5  |                     t                    5  	 d d d            n# 1 swxY w Y   d d d            n# 1 swxY w Y   |                     | j        d          5  |                     t          d          5  	 d d d            n# 1 swxY w Y   d d d            n# 1 swxY w Y   |                     t"          d          5  |                     t          d	
          5  	 d d d            n# 1 swxY w Y   d d d            n# 1 swxY w Y   t          j                    5  t          j        dt                     |                     | j                  5  |                     t                    5   |             d d d            n# 1 swxY w Y   d d d            n# 1 swxY w Y   d d d            n# 1 swxY w Y   t          j                    5  t          j        dt                     |                     t                    5  |                     t                    5   |             d d d            n# 1 swxY w Y   d d d            n# 1 swxY w Y   d d d            d S # 1 swxY w Y   d S )Nc                  :    t          j        dt                     d S r9  r  r   r   r   r  z;Test_TestCase.testAssertWarnsContext.<locals>._runtime_warn  r  r   rf   r   r   test_case.pyr  r  r  r[  r\  r  r%  )inspectgetsourcelinesr   r  r   rI  r   rJ   r  r   r   linenor  r  rL   rM   r]  rT  r  r  r   r  _runtime_warn_linenor  s       r   testAssertWarnsContextz$Test_TestCase.testAssertWarnsContext  s   	1 	1 	1&5mDDQGn-- 	MOOO	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 1>BCC 	rMOOO	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	bj.999+U333nbk222$81$<===n-- 	 	MOOOMOOO	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 n-- 	: 	:M%.9999	: 	: 	: 	: 	: 	: 	: 	: 	: 	: 	: 	: 	: 	: 	: t455 	 	!!.11                	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 ##D$98DD 	 	!!.h!??                	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 ##Ix88 	 	!!.!<<                	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 $&& 	$ 	$!)^<<<""4#899 $ $%%&899 $ $!MOOO$ $ $ $ $ $ $ $ $ $ $ $ $ $ $$ $ $ $ $ $ $ $ $ $ $ $ $ $ $	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ $&& 	$ 	$!'>:::"">22 $ $%%&899 $ $!MOOO$ $ $ $ $ $ $ $ $ $ $ $ $ $ $$ $ $ $ $ $ $ $ $ $ $ $ $ $ $	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$s  AAA;BBB6EEE<F$$F(+F(	H	$G2&H	2G6	6H	9G6	:H		HH/I1II1I	I1!I	"I11I58I5K4K6KK	K	K	
KK K75N,M5MM5M""M5%M"&M5)N5M9	9N<M9	=NNN*5Q P(:PP(PP(PP(Q (P,	,Q /P,	0Q  QQc                    |                      t                    5  |                                  d d d            n# 1 swxY w Y   |                      t                    5  |                     d           d d d            n# 1 swxY w Y   |                      t                    5  |                     t                     d d d            n# 1 swxY w Y   |                      t                    5  |                     t          df           d d d            n# 1 swxY w Y   |                      t                    5  |                     t          t          f           d d d            n# 1 swxY w Y   |                      t                    5  |                     t          t
          f           d d d            d S # 1 swxY w Y   d S r   )rL   rT  r   rt  r  rR  r   s    r   testAssertWarnsNoExceptionTypez,Test_TestCase.testAssertWarnsNoExceptionType  s   y)) 	 		 	 	 	 	 	 	 	 	 	 	 	 	 	 	y)) 	  	 Q	  	  	  	  	  	  	  	  	  	  	  	  	  	  	 y)) 	% 	%V$$$	% 	% 	% 	% 	% 	% 	% 	% 	% 	% 	% 	% 	% 	% 	%y)) 	/ 	/k1-...	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/y)) 	4 	4k62333	4 	4 	4 	4 	4 	4 	4 	4 	4 	4 	4 	4 	4 	4 	4y)) 	7 	7k95666	7 	7 	7 	7 	7 	7 	7 	7 	7 	7 	7 	7 	7 	7 	7 	7 	7 	7si   <A A !BB
B(CCC4DD!$D!"E00E47E4"GGGc                 ~   d }|                      t          d|d           |                     | j                  5  |                      t          dd            d d d            n# 1 swxY w Y   |                     t                    5  |                      t          dd            d d d            n# 1 swxY w Y   t          j                    5  t          j        dt                     |                     | j                  5  |                      t          d|d           d d d            n# 1 swxY w Y   d d d            n# 1 swxY w Y   |                     | j                  5  |                      t          d|d           d d d            n# 1 swxY w Y   t          j                    5  t          j        dt                     |                     t          | j        f          5  |                      t          d|d           d d d            n# 1 swxY w Y   d d d            d S # 1 swxY w Y   d S )Nc                 :    t          j        | t                     d S r   r  r  s    r   r  zATest_TestCase.testAssertWarnsRegexCallable.<locals>._runtime_warn      M#~.....r   o+fooxc                      dS rP  r   r   r   r   r  z<Test_TestCase.testAssertWarnsRegexCallable.<locals>.<lambda>  s    ! r   r  barzr%  )	r+  r  rL   rM   rT  r  r  r  r   r  s     r   testAssertWarnsRegexCallablez*Test_TestCase.testAssertWarnsRegexCallable   s   	/ 	/ 	/nd+V	5 	5 	5 t455 	- 	-!!.$"+)- - -	- 	- 	- 	- 	- 	- 	- 	- 	- 	- 	- 	- 	- 	- 	- y)) 	> 	>!!.$===	> 	> 	> 	> 	> 	> 	> 	> 	> 	> 	> 	> 	> 	> 	> $&& 	= 	=!)^<<<""4#899 = =%%&8$&3V= = == = = = = = = = = = = = = = =	= 	= 	= 	= 	= 	= 	= 	= 	= 	= 	= 	= 	= 	= 	= t455 	9 	9!!.$"/9 9 9	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 $&& 	= 	=!'>:::""ND4I#JKK = =%%nd&3V= = == = = = = = = = = = = = = = =	= 	= 	= 	= 	= 	= 	= 	= 	= 	= 	= 	= 	= 	= 	= 	= 	= 	=s   A%%A),A)
B33B7:B75ED0$E0D4	4E7D4	8EEE,FFF4<H20HH2H	H2!H	"H22H69H6c                    d }t          j        |          d         }|                     t          d          5 } |d           d d d            n# 1 swxY w Y   |                     |j        t                     |                     |j        j        d         d           |                     d|j	                   |                     |j
        |dz              |                     | j                  5  |                     t          d          5  	 d d d            n# 1 swxY w Y   d d d            n# 1 swxY w Y   |                     | j        d          5  |                     t          dd          5  	 d d d            n# 1 swxY w Y   d d d            n# 1 swxY w Y   |                     t          d          5  |                     t          dd	
          5  	 d d d            n# 1 swxY w Y   d d d            n# 1 swxY w Y   t          j                    5  t          j        dt                     |                     | j                  5  |                     t$          d          5   |d           d d d            n# 1 swxY w Y   d d d            n# 1 swxY w Y   d d d            n# 1 swxY w Y   |                     | j                  5  |                     t          d          5   |d           d d d            n# 1 swxY w Y   d d d            n# 1 swxY w Y   t          j                    5  t          j        dt                     |                     t          | j        f          5  |                     t          d          5   |d           d d d            n# 1 swxY w Y   d d d            n# 1 swxY w Y   d d d            d S # 1 swxY w Y   d S )Nc                 :    t          j        | t                     d S r   r  r  s    r   r  z@Test_TestCase.testAssertWarnsRegexContext.<locals>._runtime_warn#  r  r   rf   r  r  r   r  r  r  r[  r\  r  r  r%  )r  r  r+  r  rI  r   rJ   r  r   r   r  rL   rM   r]  rT  r  r  r  r   r  s       r   testAssertWarnsRegexContextz)Test_TestCase.testAssertWarnsRegexContext!  se   	/ 	/ 	/&5mDDQG"">488 	"BM&!!!	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	"bj.999+V444nbk222$81$<===t455 	 	&&~t<<                	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 ##D$98DD 	 	&&~t&JJ                	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 ##Ix88 	 	&&~tB&GG                	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 $&& 	* 	*!)^<<<""4#899 * ***+=tDD * *!M&)))* * * * * * * * * * * * * * ** * * * * * * * * * * * * * *	* 	* 	* 	* 	* 	* 	* 	* 	* 	* 	* 	* 	* 	* 	* t455 	& 	&&&~t<< & &f%%%& & & & & & & & & & & & & & &	& 	& 	& 	& 	& 	& 	& 	& 	& 	& 	& 	& 	& 	& 	& $&& 	* 	*!'>:::""ND4I#JKK * ***>4@@ * *!M&)))* * * * * * * * * * * * * * ** * * * * * * * * * * * * * *	* 	* 	* 	* 	* 	* 	* 	* 	* 	* 	* 	* 	* 	* 	* 	* 	* 	*s  AAA5D6DD6D#	#D6&D#	'D66D:=D:F:F<FF	FF	FF#&F#H#G1%H1G5	5H8G5	9HHH&5J=J&7JJ&JJ&JJ&J=&J*	*J=-J*	.J==KK"L->L
L-L	L-L	L--L14L1<O*O#N;/O;N??ON?OO*O	O*O	O**O.1O.c                 D   |                      t                    5  |                                  d d d            n# 1 swxY w Y   |                      t                    5  |                     t                     d d d            n# 1 swxY w Y   |                      t                    5  |                     dd           d d d            n# 1 swxY w Y   |                      t                    5  |                     t          d           d d d            n# 1 swxY w Y   |                      t                    5  |                     t          dfd           d d d            n# 1 swxY w Y   |                      t                    5  |                     t          t          fd           d d d            n# 1 swxY w Y   |                      t                    5  |                     t          t
          fd           d d d            d S # 1 swxY w Y   d S r  )rL   rT  r+  r  rt  rR  r   s    r   #testAssertWarnsRegexNoExceptionTypez1Test_TestCase.testAssertWarnsRegexNoExceptionTypeM  s   y)) 	$ 	$!!###	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$y)) 	/ 	/!!+...	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/y)) 	/ 	/!!!X...	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/y)) 	4 	4!!&(333	4 	4 	4 	4 	4 	4 	4 	4 	4 	4 	4 	4 	4 	4 	4y)) 	> 	>!!;"2H===	> 	> 	> 	> 	> 	> 	> 	> 	> 	> 	> 	> 	> 	> 	>y)) 	C 	C!!;"7BBB	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	Cy)) 	F 	F!!;	":HEEE	F 	F 	F 	F 	F 	F 	F 	F 	F 	F 	F 	F 	F 	F 	F 	F 	F 	Fs{   <A A !BBB-CCC5DD!$D!E,,E03E0#G  GG%#HHHc              #      K   t                      5 }d V  d d d            n# 1 swxY w Y   |                     |                                d           d S )Nr  )r
   rJ   getvalue)r   bufs     r   assertNoStderrzTest_TestCase.assertNoStderr]  s       	#EEE	 	 	 	 	 	 	 	 	 	 	 	 	 	 	,,,,,s   "&&c                 N   |                      t          |          t          |                     t          ||          D ]c\  }}|                     |t          j                   |                                D ])\  }}|                      t          ||          |           *dd S r   )rJ   r  ziprI  logging	LogRecorditemsgetattr)r   recordsmatchesrecmatchkr  s          r   assertLogRecordszTest_TestCase.assertLogRecordsc  s    Ws7||444gw// 	5 	5JC!!#w'8999 5 51  a!44445	5 	5r   c                    |                                  5  |                                 5 }t                              d           t                              d           d d d            n# 1 swxY w Y   |                     |j        dg           |                     |j	        ddig           d d d            d S # 1 swxY w Y   d S )N1r  
INFO:foo:1namer   )
r  
assertLogslog_fooinfo
log_foobarr"  rJ   outputr  r  r   r  s     r   testAssertLogsDefaultsz$Test_TestCase.testAssertLogsDefaultsj  sO     "" 	A 	A"" &bS!!!  %%%& & & & & & & & & & & & & & & RY777!!"*.?@@@	A 	A 	A 	A 	A 	A 	A 	A 	A 	A 	A 	A 	A 	A 	A 	A 	A 	As4   B=5A+B=+A/	/B=2A/	3=B==CCc                    |                                  5  |                                 5 }t                              d           t                              d           t                              d           d d d            n# 1 swxY w Y   |                     |j	        ddg           | 
                    |j        ddiddig           d d d            d S # 1 swxY w Y   d S )	Nr  r  3r  WARNING:quux:3r  r   r   r  r  r  r  r  r"  log_quuxr   rJ   r  r  r  r  s     r   !testAssertLogsTwoMatchingMessagesz/Test_TestCase.testAssertLogsTwoMatchingMessagess  sx     "" 	H 	H"" &bS!!!  %%%  %%%& & & & & & & & & & & & & & & RY7G(HIII!!"*%+UOff5E#FH H H	H 	H 	H 	H 	H 	H 	H 	H 	H 	H 	H 	H 	H 	H 	H 	H 	H 	Hs6   CAB9CB			CB		ACC"Cc                    |                                  5  |                     |          5 }t                              d           t                              d           t                              d           d d d            n# 1 swxY w Y   |                     |j	        ddg           | 
                    |j        ddidd	ig           d d d            d S # 1 swxY w Y   d S )
Nlevelr  r  r  zERROR:foo.bar:2zCRITICAL:quux:3r  r   r   )r  r  r  r   r  r%  r  criticalrJ   r  r  r  )r   r  r  s      r   checkAssertLogsPerLevelz%Test_TestCase.checkAssertLogsPerLevel~  s~     "" 	L 	Lu-- '$$$  %%%!!#&&&' ' ' ' ' ' ' ' ' ' ' ' ' ' ' RY):<M(NOOO!!"*%+Y$7&&9I#JL L L	L 	L 	L 	L 	L 	L 	L 	L 	L 	L 	L 	L 	L 	L 	L 	L 	L 	Ls6   CAB;CB	CB	ACC!$C!c                 n    |                      t          j                   |                      d           d S )NERROR)r  r  r  r   s    r   testAssertLogsPerLevelz$Test_TestCase.testAssertLogsPerLevel  s2    $$W]333$$W-----r   c                 j   |                                  5  |                     d          5 }|                     |d          5 }t                              d           t                              d           t                              d           d d d            n# 1 swxY w Y   |                     |j	        ddg           | 
                    |j        dd	idd
ig           d d d            n# 1 swxY w Y   |                     |j	        dg           d d d            d S # 1 swxY w Y   d S )NDEBUGr  r  r  r  r  zDEBUG:foo.bar:2r  r   r   r  r  )r   loggerouter_cmr  s       r   checkAssertLogsPerLoggerz&Test_TestCase.checkAssertLogsPerLogger  s     "" 
	B 
	Bw// O8__V7_;; *rLL%%%$$S)))$$S)))* * * * * * * * * * * * * * *   \;L,MNNN%%bj)/&)9L'MO O OO O O O O O O O O O O O O O O X_/?.@AAA
	B 
	B 
	B 
	B 
	B 
	B 
	B 
	B 
	B 
	B 
	B 
	B 
	B 
	B 
	B 
	B 
	B 
	BsZ   D(C4ABC4B##C4&B#'AC4(D(4C8	8D(;C8	<D((D,/D,c                 ~    |                      t          j        d                     |                      d           d S r9  )r  r  	getLoggerr   s    r   testAssertLogsPerLoggerz%Test_TestCase.testAssertLogsPerLogger  s;    %%g&7&>&>???%%e,,,,,r   c                    |                                  5  |                     | j                  5  |                                 5  	 d d d            n# 1 swxY w Y   d d d            n# 1 swxY w Y   d d d            d S # 1 swxY w Y   d S r   )r  rL   rM   r  r   s    r   testAssertLogsFailureNoLogsz)Test_TestCase.testAssertLogsFailureNoLogs  sL     "" 	 	""4#899  __&&                              	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	sX   BA*AA*AA*AA*B*A.	.B1A.	2BB	Bc                 T   |                                  5  |                     | j                  5  |                     d          5  t                              d           d d d            n# 1 swxY w Y   d d d            n# 1 swxY w Y   d d d            d S # 1 swxY w Y   d S NWARNINGr  r  )r  rL   rM   r  r  r  r   s    r   !testAssertLogsFailureLevelTooHighz/Test_TestCase.testAssertLogsFailureLevelTooHigh  s_     "" 	& 	&""4#899 & &__9_55 & &LL%%%& & & & & & & & & & & & & & && & & & & & & & & & & & & & &	& 	& 	& 	& 	& 	& 	& 	& 	& 	& 	& 	& 	& 	& 	& 	& 	& 	&sX   BBA."B.A22B5A26B9BB			BB		BB!$B!c                 ,   |                                  5  t          j        }t                              t          j                   	 |                     | j                  5  |                     d          5  t          	                    d           d d d            n# 1 swxY w Y   d d d            n# 1 swxY w Y   t                              |           n# t                              |           w xY w	 d d d            d S # 1 swxY w Y   d S r  )
r  r  r  setLevelr  INFOrL   rM   r  r  )r   oldLevels     r   4testAssertLogsFailureLevelTooHigh_FilterInRootLoggerzBTest_TestCase.testAssertLogsFailureLevelTooHigh_FilterInRootLogger  s     "" 	+ 	+}HW\***+&&t'<== * *y99 * *S)))* * * * * * * * * * * * * * ** * * * * * * * * * * * * * *   ****  *****	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+sq   1D	C!B68BB6B##B6&B#'B6*C6B:	:C=B:	>CD	C88D		DDc                 X   |                      dd          5  |                     | j                  5  |                      d          5  t                              d           d d d            n# 1 swxY w Y   d d d            n# 1 swxY w Y   d d d            d S # 1 swxY w Y   d S )Nr   r  r  r   r  )r  rL   rM   r  r%  r   s    r   &testAssertLogsFailureMismatchingLoggerz4Test_TestCase.testAssertLogsFailureMismatchingLogger  sc    __V7_33 	( 	(""4#899 ( (__U++ ( (NN3'''( ( ( ( ( ( ( ( ( ( ( ( ( ( (( ( ( ( ( ( ( ( ( ( ( ( ( ( (	( 	( 	( 	( 	( 	( 	( 	( 	( 	( 	( 	( 	( 	( 	( 	( 	( 	(sX   BB	A0$B0A44B7A48B;BB	BB	BB#&B#c                     |                      t                    5  |                                 5  t          d          # 1 swxY w Y   	 d d d            d S # 1 swxY w Y   d S r  )rL   ZeroDivisionErrorr  r   s    r   !testAssertLogsUnexpectedExceptionz/Test_TestCase.testAssertLogsUnexpectedException  s    011 	6 	6"" 6 6'5556 6 6 6 6 6 6 6 6	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6.   AA  A	AA	AA Ac                 z   |                      | j                  5 }|                                 5  t                              d           t
                              d           d d d            n# 1 swxY w Y   d d d            n# 1 swxY w Y   |                     t          |j	                  d           d S )Nr  r  z%Unexpected logs found: ['INFO:foo:1'])
rL   rM   assertNoLogsr  r  r  r"  rJ   r   r  r  s     r   testAssertNoLogsDefaultz%Test_TestCase.testAssertNoLogsDefault  s,   t455 	&""$$ & &S!!!  %%%& & & & & & & & & & & & & & &	& 	& 	& 	& 	& 	& 	& 	& 	& 	& 	& 	& 	& 	& 	& 	3	
 	
 	
 	
 	
4   B5A1%B1A5	5B8A5	9BBBc                 z   |                      | j                  5 }|                                 5  t                              d           t
                              d           d d d            n# 1 swxY w Y   d d d            n# 1 swxY w Y   |                     t          |j                  d           d S )Nr  r   z8Unexpected logs found: ['ERROR:quux:1', 'ERROR:foo:foo'])	rL   rM   r  r  r%  r  rJ   r   r  r  s     r    testAssertNoLogsFailureFoundLogsz.Test_TestCase.testAssertNoLogsFailureFoundLogs  s*   t455 	%""$$ % %s###e$$$% % % % % % % % % % % % % % %	% 	% 	% 	% 	% 	% 	% 	% 	% 	% 	% 	% 	% 	% 	%
 	F	
 	
 	
 	
 	
r  c                 ^   |                                  5  |                     t                    5  |                     t                    5  t                              d           d d d            n# 1 swxY w Y   d d d            n# 1 swxY w Y   d d d            d S # 1 swxY w Y   d S )Nr  r  )r  r  r  r  r  r%  r   s    r   testAssertNoLogsPerLoggerz'Test_TestCase.testAssertNoLogsPerLogger  s]     "" 	( 	(** ( (&&g&66 ( (NN3'''( ( ( ( ( ( ( ( ( ( ( ( ( ( (( ( ( ( ( ( ( ( ( ( ( ( ( ( (	( 	( 	( 	( 	( 	( 	( 	( 	( 	( 	( 	( 	( 	( 	( 	( 	( 	(sX   B"B
A3'B
3A77B
:A7;B
>B"
B	B"B	B""B&)B&c                    |                      | j                  5 }|                     t                    5  |                     t
                    5  t                              d           t                              d           d d d            n# 1 swxY w Y   d d d            n# 1 swxY w Y   d d d            n# 1 swxY w Y   | 	                    t          |j                  d           d S )Nr  r  r  z)Unexpected logs found: ['INFO:foo.bar:2'])rL   rM   r  r  r  r  r%  r  r  rJ   r   r  r  s     r    testAssertNoLogsFailurePerLoggerz.Test_TestCase.testAssertNoLogsFailurePerLogger  s    t455 	)** ) )&&g&66 ) )NN3'''OOC((() ) ) ) ) ) ) ) ) ) ) ) ) ) )) ) ) ) ) ) ) ) ) ) ) ) ) ) )	) 	) 	) 	) 	) 	) 	) 	) 	) 	) 	) 	) 	) 	) 	)
 	7	
 	
 	
 	
 	
sX   CB*5BB*BB*BB*C*B.	.C1B.	2CCCc                 $   |                                  5  |                     d          5  t                              d           t                              d           d d d            n# 1 swxY w Y   d d d            d S # 1 swxY w Y   d S )Nr  r  r   r  )r  r  r  r  r  r"  r   s    r   testAssertNoLogsPerLevelz&Test_TestCase.testAssertNoLogsPerLevel  s     "" 	$ 	$"""11 $ $U###s###$ $ $ $ $ $ $ $ $ $ $ $ $ $ $	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$s4   B5A-!B-A1	1B4A1	5BB	B	c                 ~   |                      | j                  5 }|                     d          5  t                              d           t
                              d           d d d            n# 1 swxY w Y   d d d            n# 1 swxY w Y   |                     t          |j                  d           d S )Nr  r  r   r  z8Unexpected logs found: ['DEBUG:foo:foo', 'DEBUG:quux:1'])	rL   rM   r  r  r"  r  rJ   r   r  r  s     r   testAssertNoLogsFailurePerLevelz-Test_TestCase.testAssertNoLogsFailurePerLevel  s/   t455 	$"""11 $ $e$$$s###$ $ $ $ $ $ $ $ $ $ $ $ $ $ $	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	F	
 	
 	
 	
 	
s4   B
5A3'B
3A7	7B
:A7	;B

BBc                     |                      t                    5  |                                 5  t          d          # 1 swxY w Y   	 d d d            d S # 1 swxY w Y   d S r  )rL   r  r  r   s    r   #testAssertNoLogsUnexpectedExceptionz1Test_TestCase.testAssertNoLogsUnexpectedException  s    011 	6 	6""$$ 6 6'5556 6 6 6 6 6 6 6 6	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6r  c                     |                                  5 }	 d d d            n# 1 swxY w Y   |                     |           d S r   )r  ra  )r   values     r   testAssertNoLogsYieldsNonez(Test_TestCase.testAssertNoLogsYieldsNone  s       	E	 	 	 	 	 	 	 	 	 	 	 	 	 	 	%     s   #''c                    | j         df| j        df| j        df| j        df| j        df| j        df| j        df| j        df| j        df| j	        df| j
        t          d ff| j        df| j        t          dd	
          t          dd	d          ff| j        t           dd ff| j        dff}|D ]<\  }}|                     t&                    5   ||  ddd           n# 1 swxY w Y   =dS )zY
        Test that the deprecated methods raise a DeprecationWarning. See #9424.
        )rH   r  rH   rH   )       @r  )g      @g      @)Tc                     ddz   S )NgQ	@spamr   )_s    r   r  z9Test_TestCase.testDeprecatedMethodNames.<locals>.<lambda>  s
    $- r   )Frf   rI   r  rH   )rp  rq  r  r   c                      i d         S r9  r   r   r   r   r  z9Test_TestCase.testDeprecatedMethodNames.<locals>.<lambda>  s
    5	 r   )r  r  N)failIfEqualassertNotEqualsfailUnlessEqualassertEqualsfailUnlessAlmostEqualassertAlmostEqualsfailIfAlmostEqualassertNotAlmostEquals
failUnlessassert_failUnlessRaisesrT  failIfr  r  assertRaisesRegexpKeyErrorassertRegexpMatchesr   r   )r   oldmethr  s       r   testDeprecatedMethodNamesz'Test_TestCase.testDeprecatedMethodNames  st   
 v&!6*!6*''4$j1#Z0'4_g&\7#"Y0G0G$HI[(#*TA^^^TAa=P=P=P,QR$x8I8I&JK%~6
"  	 	JD$!!"455  d              	 	s   C  C$	'C$	c                     t           j        dd         dk     rdS g d}|D ]D}|                     t                    5  t	          | |           ddd           n# 1 swxY w Y   EdS )z9Test that the deprecated fail* methods get removed in 3.xNrI   r  )r   r"  r$  r&  r(  r*  r+  r  )r2  version_inforL   rN   r  )r   deprecated_namesdeprecated_names      r   _testDeprecatedFailMethodsz(Test_TestCase._testDeprecatedFailMethods'  s    BQB&((F
 
 

  0 	/ 	/O"">22 / /o.../ / / / / / / / / / / / / / /	/ 	/s   AA	!A	c                 j     G d dt           j                  } |d          }t          |           d S )Nc                       e Zd Zd ZdS )0Test_TestCase.testDeepcopy.<locals>.TestableTestc                     d S r   r   r   s    r   testNothingz<Test_TestCase.testDeepcopy.<locals>.TestableTest.testNothing7  rn   r   N)r   r   r    r;  r   r   r   TestableTestr9  6  rp   r   r<  r;  )r:   r;   r   )r   r<  r+   s      r   testDeepcopyzTest_TestCase.testDeepcopy4  sQ    	 	 	 	 	8, 	 	 	 |M** 	r   c                 H   t          j        d          }t          t          j        dz             D ]p}t          j        ||          }t          j        |          }|                     ||           |                    t                      t                                 qd S )NrO   rf   )protocol)	r:   r;   r  pickleHIGHEST_PROTOCOLdumpsloadsrJ   r  )r   r+   r?  pickled_testunpickled_tests        r   
testPicklezTest_TestCase.testPickle?  s    
  ''f59:: 		5 		5H "<x@@@L#\,77NT>222 &&suucee4444		5 		5r   c                    ddd  G fddt           j                  } G fddt           j                  } G fddt           j                  } G fd	d
t           j                  }||||fD ]Q}|                     t                    5   |d                                           d d d            n# 1 swxY w Y   Rd S )Nc                     t           r   )KeyboardInterruptr   s    r   _raisez3Test_TestCase.testKeyboardInterrupt.<locals>._raiseQ  s    ##r   c                     d S r   r   r   s    r   nothingz4Test_TestCase.testKeyboardInterrupt.<locals>.nothingS      Dr   c                       e Zd Z ZdS )2Test_TestCase.testKeyboardInterrupt.<locals>.Test1Nr   r   r    test_somethingrJ  s   r   Test1rO  V          #NNNr   rS  c                       e Zd Z ZZdS )2Test_TestCase.testKeyboardInterrupt.<locals>.Test2Nr   r   r    r2   rQ  rJ  rL  s   r   Test2rV  Y          E$NNNr   rY  c                       e Zd ZZ ZdS )2Test_TestCase.testKeyboardInterrupt.<locals>.Test3Nr   r   r    rQ  r7   rX  s   r   Test3r\  ]          $NHHHr   r^  c                       e Zd Z fdZdS )2Test_TestCase.testKeyboardInterrupt.<locals>.Test4c                 2    |                                 d S r   r  r   rJ  s    r   rQ  zATest_TestCase.testKeyboardInterrupt.<locals>.Test4.test_somethingb      '''''r   NrP  rR  s   r   Test4ra  a  .        ( ( ( ( ( ( (r   rf  rQ  r   )r:   r;   rL   rI  rO   )r   rS  rY  r^  rf  klassrJ  rL  s         @@r   testKeyboardInterruptz#Test_TestCase.testKeyboardInterruptP  s   	$ 	$ 	$ 	$	 	 		$ 	$ 	$ 	$ 	$ 	$ 	$H% 	$ 	$ 	$	% 	% 	% 	% 	% 	% 	% 	%H% 	% 	% 	%	 	 	 	 	 	 	 	H% 	 	 		( 	( 	( 	( 	( 	( 	(H% 	( 	( 	( UE51 	. 	.E""#455 . .&''++---. . . . . . . . . . . . . . .	. 	.s   C  C	C	c                    ddd  G fddt           j                  } G fddt           j                  } G fddt           j                  } G fd	d
t           j                  }||||fD ]v}t          j                    } |d                              |           |                     t          |j                  d           |                     |j        d           wd S )Nc                 *    t          j        d          )Nzsome reason)r:   SkipTestr   s    r   _skipz3Test_TestCase.testSkippingEverywhere.<locals>._skipj  s    #M222r   c                     d S r   r   r   s    r   rL  z5Test_TestCase.testSkippingEverywhere.<locals>.nothingl  rM  r   c                       e Zd Z ZdS )3Test_TestCase.testSkippingEverywhere.<locals>.Test1NrP  rm  s   r   rS  rp  o  s        "NNNr   rS  c                       e Zd Z ZZdS )3Test_TestCase.testSkippingEverywhere.<locals>.Test2NrW  rm  rL  s   r   rY  rs  r  s        E$NNNr   rY  c                       e Zd ZZ ZdS )3Test_TestCase.testSkippingEverywhere.<locals>.Test3Nr]  rt  s   r   r^  rv  v  s        $NHHHr   r^  c                       e Zd Z fdZdS )3Test_TestCase.testSkippingEverywhere.<locals>.Test4c                 2    |                                 d S r   rc  )r   rm  s    r   rQ  zBTest_TestCase.testSkippingEverywhere.<locals>.Test4.test_something{  s    &&&&&r   NrP  rq  s   r   rf  rx  z  s.        ' ' ' ' ' ' 'r   rf  rQ  rf   r   )r:   r;   rs   rO   rJ   r  skippedtestsRun)	r   rS  rY  r^  rf  rh  rt   rm  rL  s	          @@r   testSkippingEverywherez$Test_TestCase.testSkippingEverywherei  s   	3 	3 	3 	3	 	 		# 	# 	# 	# 	# 	# 	#H% 	# 	# 	#	% 	% 	% 	% 	% 	% 	% 	%H% 	% 	% 	%	 	 	 	 	 	 	 	H% 	 	 		' 	' 	' 	' 	' 	' 	'H% 	' 	' 	' UE51 	1 	1E(**FE"##''///S00!444V_a0000		1 	1r   c                    ddd  G fddt           j                  } G fddt           j                  } G fddt           j                  } G fd	d
t           j                  }||||fD ]v}t          j                    } |d                              |           |                     t          |j                  d           |                     |j        d           wd S )Nc                     t           r   )
SystemExitr   s    r   rJ  z,Test_TestCase.testSystemExit.<locals>._raise  s    r   c                     d S r   r   r   s    r   rL  z-Test_TestCase.testSystemExit.<locals>.nothing  rM  r   c                       e Zd Z ZdS )+Test_TestCase.testSystemExit.<locals>.Test1NrP  rR  s   r   rS  r    rT  r   rS  c                       e Zd Z ZZdS )+Test_TestCase.testSystemExit.<locals>.Test2NrW  rX  s   r   rY  r    rZ  r   rY  c                       e Zd ZZ ZdS )+Test_TestCase.testSystemExit.<locals>.Test3Nr]  rX  s   r   r^  r    r_  r   r^  c                       e Zd Z fdZdS )+Test_TestCase.testSystemExit.<locals>.Test4c                 2    |                                 d S r   rc  rd  s    r   rQ  z:Test_TestCase.testSystemExit.<locals>.Test4.test_something  re  r   NrP  rR  s   r   rf  r    rg  r   rf  rQ  rf   r   )r:   r;   rs   rO   rJ   r  errorsr{  )	r   rS  rY  r^  rf  rh  rt   rJ  rL  s	          @@r   testSystemExitzTest_TestCase.testSystemExit  s   	 	 	 		 	 		$ 	$ 	$ 	$ 	$ 	$ 	$H% 	$ 	$ 	$	% 	% 	% 	% 	% 	% 	% 	%H% 	% 	% 	%	 	 	 	 	 	 	 	H% 	 	 		( 	( 	( 	( 	( 	( 	(H% 	( 	( 	( UE51 	1 	1E(**FE"##''///S//333V_a0000		1 	1r   c                     t          j                    }t          j        |          }t	          j                    5  ~|                      |                       d d d            d S # 1 swxY w Y   d S r   )r:   r;   weakrefrefr   
disable_gcru  )r   r  wrs      r   testNoCycleszTest_TestCase.testNoCycles  s     ""[!! 	# 	#RRTT"""	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	#s   A''A+.A+c                      G fddt                      G fddt          j                  }dD ]J} ||          }|                                 t	                       |                     j        d           Kd S )Nc                   (    e Zd ZdZ fdZ fdZdS )9Test_TestCase.test_no_exception_leak.<locals>.MyExceptionr   c                 \    xj         dz  c_         t                              |            d S r   )	ninstancerR  r.   r   rC   s    r   r.   zBTest_TestCase.test_no_exception_leak.<locals>.MyException.__init__  s1    %%*%%""4(((((r   c                 (    xj         dz  c_         d S r   )r  r  s    r   __del__zATest_TestCase.test_no_exception_leak.<locals>.MyException.__del__  s    %%*%%%%r   N)r   r   r    r  r.   r  rB   s   r   rC   r    sL        I) ) ) ) )+ + + + + + +r   rC   c                   >    e Zd Z fdZej         fd            ZdS )6Test_TestCase.test_no_exception_leak.<locals>.TestCasec                                  r   r   r  s    r   r   z<Test_TestCase.test_no_exception_leak.<locals>.TestCase.test1  s    !kmm#r   c                                  r   r   r  s    r   r%   z<Test_TestCase.test_no_exception_leak.<locals>.TestCase.test2  s    !kmm#r   N)r   r   r    r   r:   expectedFailurer%   rB   s   r   r;   r    sW        $ $ $ $ $ %$ $ $ $ &%$ $ $r   r;   )r   r%   r   )rR  r:   r;   rO   r   rJ   r  )r   r;   method_nametestcaserC   s       @r   test_no_exception_leakz$Test_TestCase.test_no_exception_leak  s    	+ 	+ 	+ 	+ 	+ 	+ 	+) 	+ 	+ 	+	$ 	$ 	$ 	$ 	$ 	$ 	$x( 	$ 	$ 	$ . 	7 	7Kx,,HLLNNNLLL[2A6666		7 	7r   N)}r   r   r    r   r!   eq_pairsr&   ne_pairsrP   rW   r`   ri   ru   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r  r#  r*  r3  r:  r?  rD  rJ  rQ  rW  r_  rc  r:   skipIfr2  r3  optimizerf  rh  rj  ry  r}  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r&  r(  r5  r8  r>  rV  r^  r`  rf  rm  rs  r{  r  r  r  r  r  r  r  r  r  r  r  r/  contextmanagerr  r  r  r  r  r  r  r  r  r  r  r   r  r  r
  r  r  r  r  r  r  r1  r6  r=  rF  ri  r|  r  r   cpython_onlyr  r  r   r   r   r=   r=   9   s        '""DHHW$5$567H '""DHHY$7$78'""DHHW$5$56'""DHHW$5$568H"  *@ @ @
4 
4 
4: : :< < <+ + ++ + +.+ + + + + +.+ + ++ + +,+ + ++ + +"  / / />2 2 20C C CC C C2 2 2K K KK K K+ + +&+ + +8= = =&D D D+ + +.+ + +$    / / /+ + +*	& 	& 	&) ) )"3 3 3 X_SY'1,@B BK KB BK X_SY'1,@B B
 
B B
 X_SY'1,@B BQ QB BQ! ! !Q Q Q
Q Q Q
' ' '' ' '# # #*O O O<#) #) #)J2M 2M 2Mh&' &' &'P, , ,
6 
6 
6
; 
; 
;"+ "+ "+HQ Q Q:<* <* <*|&R &R &RP8W 8W 8Wt7 7 7>7 7 7 JD JD JDXM M M, , ,
0 0 0(0 0 0@
4 
4 
4: : :
C 
C 
C  $R R RR R R% % %0 0 0' ' 'C C CD D D:.$ .$ .$`7 7 7= = =B** ** **XF F F  - - -
5 5 5A A A	H 	H 	H	L 	L 	L. . .B B B- - -  & & &
+ 
+ 
+( ( (6 6 6
 
 
	
 	
 	
( ( (
 
 
$ $ $	
 	
 	
6 6 6! ! !
  6/ / /	 	 	5 5 5". . .21 1 161 1 16 # # #7 7 7 7 7r   r=   __main__)#r/  r  r  r@  rk  r2  r  r  r  r  r  copyr   r+   r   r:   unittest.test.supportr   r   r   r   r	   test.supportr
   r   r  r  r  r  rt  r   r;   r=   r   mainr   r   r   <module>r     s          				 



                                5 4 4 4 4 4 4 4 '
E
"
"Wy))
7V$$+ + + + +6 + + +6G7 G7 G7 G7 G7H%|[ G7 G7 G7T< zHMOOOOO r   