HEX
Server: Apache
System: Linux bd12.noc223.com 4.18.0-553.121.1.lve.el8.x86_64 #1 SMP Thu Apr 30 16:40:41 UTC 2026 x86_64
User: handcraf (1693)
PHP: 8.1.28
Disabled: NONE
Upload Files
File: //opt/alt/python312/lib64/python3.12/test/test_unittest/__pycache__/test_case.cpython-312.opt-1.pyc
�

h�e�0���ddlZddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlmZddl
mZddlZddlmZmZmZmZmZddlmZmZej2d�Zej2d�Zej2d�ZGd	�d
e�ZGd�dej>ee�Z e!d
k(rejD�yy)�N)�deepcopy)�support)�TestEquality�TestHashing�
LoggingResult�LegacyLoggingResult�#ResultWithNoStartTestRunStopTestRun)�captured_stderr�
gc_collect�foo�foo.bar�quuxc�z�eZdZdZGd�dej
�ZGd�de�ZGd�dej
�Zy)	�Testz5Keep these TestCase classes out of the main namespacec��eZdZd�Zd�Zy)�Test.Fooc��y�N���selfs �C/opt/alt/python312/lib64/python3.12/test/test_unittest/test_case.py�runTestzTest.Foo.runTest"���c��yrrrs r�test1zTest.Foo.test1#rrN)�__name__�
__module__�__qualname__rrrrr�Foor!s���rr!c��eZdZd�Zy)�Test.Barc��yrrrs r�test2zTest.Bar.test2&rrN)rrr r%rrr�Barr#%s��rr&c�4��eZdZdZ�fd�Zd�Zd�Zd�Z�xZS)�Test.LoggingTestCasez!A test case which logs its calls.c�N��ttj|�d�||_y�N�test)�superr�LoggingTestCase�__init__�events)rr/�	__class__s  �rr.zTest.LoggingTestCase.__init__+s����$�&�&��6�v�>� �D�Krc�:�|jjd�y)N�setUp�r/�appendrs rr2zTest.LoggingTestCase.setUp/s���K�K���w�'rc�:�|jjd�yr*r3rs rr+zTest.LoggingTestCase.test2s���K�K���v�&rc�:�|jjd�y)N�tearDownr3rs rr7zTest.LoggingTestCase.tearDown5s���K�K���z�*r)	rrr �__doc__r.r2r+r7�
__classcell__)r0s@rr-r((s���/�	!�	(�	'�	+rr-N)	rrr r8�unittest�TestCaser!r&r-rrrrrs5��;��h�����c��+�(�+�+�+rrc���eZdZej	d�ej	d�fgZej	d�ej	d�fej	d�ej
d�fej	d�ej
d�fgZd�Zd�Z	d�Z
d�Zd�Zd	�Z
d
�Zd�Zd�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z d�Z!d�Z"d�Z#d �Z$d!�Z%d"�Z&d#�Z'd$�Z(d%�Z)e*jVe,jZj\d&k\d'�d(��Z/e*jVe,jZj\d&k\d'�d)��Z0e*jVe,jZj\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�ZZdT�Z[dU�Z\e]j�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�Zxdp�Zyezj�dq��Z|dr�Z}ys)t�
Test_TestCaserrr%c���Gd�dtj�}|j|�j�ddd�tj�}|jdd�|j	|j
�5|jdd�ddd�|j	t�5|j�ddd�y#1swY�8xYw#1swYyxYw)Nc��eZdZd�Zd�Zy)�3Test_TestCase.test_init__no_test_name.<locals>.Testc��t��r��MyExceptionrs rrz;Test_TestCase.test_init__no_test_name.<locals>.Test.runTestU�	��[�]�2rc��yrrrs rr+z8Test_TestCase.test_init__no_test_name.<locals>.Test.testVrrN�rrr rr+rrrrr@T���2� rri�z
.Test.runTest��)r:r;�assertEqual�id�assertRaises�failureException�AttributeError�run)rrr+s   r�test_init__no_test_namez%Test_TestCase.test_init__no_test_nameSs���	!�8�$�$�	!�	
��������S�T�*�O�<�� � �"������A��
�
�
�t�4�4�
5�	#����Q��"�	#��
�
�~�
.�	��H�H�J�	�	�	#�	#��	�	�s�C
�3C�
C�C"c��Gd�dtj�}|j|d�j�ddd�y)Nc��eZdZd�Zd�Zy)�7Test_TestCase.test_init__test_name__valid.<locals>.Testc��t��rrBrs rrz?Test_TestCase.test_init__test_name__valid.<locals>.Test.runTestjrDrc��yrrrs rr+z<Test_TestCase.test_init__test_name__valid.<locals>.Test.testkrrNrFrrrrrSirGrrr+i����z
.Test.test)r:r;rJrK�rrs  r�test_init__test_name__validz)Test_TestCase.test_init__test_name__validhs8��	!�8�$�$�	!�	
����f����*�3�4�0�,�?rc��Gd�dtj�}	|d�|jd�y#t$rYywxYw)Nc��eZdZd�Zd�Zy)�9Test_TestCase.test_init__test_name__invalid.<locals>.Testc��t��rrBrs rrzATest_TestCase.test_init__test_name__invalid.<locals>.Test.runTesturDrc��yrrrs rr+z>Test_TestCase.test_init__test_name__invalid.<locals>.Test.testvrrNrFrrrrrZtrGrr�testfoozFailed to raise ValueError)r:r;�fail�
ValueErrorrVs  r�test_init__test_name__invalidz+Test_TestCase.test_init__test_name__invalidssC��	!�8�$�$�	!�	4���O�
�I�I�2�3���	��	�s�5�	A�Ac��Gd�dtj�}|j|d�j�d�y)Nc��eZdZd�Zy)�.Test_TestCase.test_countTestCases.<locals>.Fooc��yrrrs rr+z3Test_TestCase.test_countTestCases.<locals>.Foo.test�rrN�rrr r+rrrr!rc�s�� rr!r+�)r:r;rJ�countTestCases�rr!s  r�test_countTestCasesz!Test_TestCase.test_countTestCases�s3��	!�(�#�#�	!�	
����V��3�3�5�q�9rc��Gd�dtj�}|�j�}|jt	|�tj
�y)Nc��eZdZd�Zy)�1Test_TestCase.test_defaultTestResult.<locals>.Fooc��yrrrs rrz9Test_TestCase.test_defaultTestResult.<locals>.Foo.runTest����rN�rrr rrrrr!rl����
rr!)r:r;�defaultTestResultrJ�type�
TestResult)rr!�results   r�test_defaultTestResultz$Test_TestCase.test_defaultTestResult�s@��	�(�#�#�	���(�(�*������f��x�':�':�;rc���g}t|�}G�fd�dtj���|�j|�gd�}|j	||�y)Nc�"���eZdZ��fd�Z�xZS)�>Test_TestCase.test_run_call_order__error_in_setUp.<locals>.Fooc�6��t�|��td���Nzraised by Foo.setUp�r,r2�RuntimeError�rr!r0s ��rr2zDTest_TestCase.test_run_call_order__error_in_setUp.<locals>.Foo.setUp������c�4�&�(�"�#8�9�9r)rrr r2r9�r0r!s@�rr!rx�s
���
:�
:rr!)�	startTestr2�addError�stopTest�rrr-rOrJ�rr/rt�expectedr!s    @r�#test_run_call_order__error_in_setUpz1Test_TestCase.test_run_call_order__error_in_setUp�sK������v�&��	:�$�&�&�	:�
	�F������A�������*rc���g}G�fd�dtj���|�j�gd�}|j||�y)Nc�(���eZdZd�Z��fd�Z�xZS)�MTest_TestCase.test_run_call_order__error_in_setUp_default_result.<locals>.Fooc�,�t|j�Sr�rr/rs rrqz_Test_TestCase.test_run_call_order__error_in_setUp_default_result.<locals>.Foo.defaultTestResult����$�T�[�[�1�1rc�6��t�|��td��rzr{r}s ��rr2zSTest_TestCase.test_run_call_order__error_in_setUp_default_result.<locals>.Foo.setUp�r~r)rrr rqr2r9rs@�rr!r��s���
2�
:�
:rr!)�startTestRunr�r2r�r��stopTestRun�rr-rOrJ�rr/r�r!s   @r�2test_run_call_order__error_in_setUp_default_resultz@Test_TestCase.test_run_call_order__error_in_setUp_default_result�sA�����	:�$�&�&�	:�	�F�����/�������*rc���g}t|�}G�fd�dtj��gd�}�|�j|�|j	||�y)Nc�"���eZdZ��fd�Z�xZS)�=Test_TestCase.test_run_call_order__error_in_test.<locals>.Fooc�6��t�|��td���N�raised by Foo.test�r,r+r|r}s ��rr+zBTest_TestCase.test_run_call_order__error_in_test.<locals>.Foo.test������c�4�%�'�"�#7�8�8r�rrr r+r9rs@�rr!r��s
���
9�
9rr!)r�r2r+r�r7r�r�r�s    @r�"test_run_call_order__error_in_testz0Test_TestCase.test_run_call_order__error_in_test�sK������v�&��	9�$�&�&�	9�
8���F�����������*rc���g}G�fd�dtj��gd�}�|�j�|j||�y)Nc�(���eZdZd�Z��fd�Z�xZS)�LTest_TestCase.test_run_call_order__error_in_test_default_result.<locals>.Fooc�,�t|j�Srr�rs rrqz^Test_TestCase.test_run_call_order__error_in_test_default_result.<locals>.Foo.defaultTestResult�r�rc�6��t�|��td��r�r�r}s ��rr+zQTest_TestCase.test_run_call_order__error_in_test_default_result.<locals>.Foo.test�r�r�rrr rqr+r9rs@�rr!r��s���
2�
9�
9rr!)r�r�r2r+r�r7r�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�G���F����������*rc���g}t|�}G�fd�dtj��gd�}�|�j|�|j	||�y)Nc�"���eZdZ��fd�Z�xZS)�?Test_TestCase.test_run_call_order__failure_in_test.<locals>.Fooc�D��t�|��|jd�yr��r,r+r^r}s ��rr+zDTest_TestCase.test_run_call_order__failure_in_test.<locals>.Foo.test������c�4�%�'��	�	�.�/rr�rs@�rr!r��s
���
0�
0rr!�r�r2r+�
addFailurer7r�r�r�s    @r�$test_run_call_order__failure_in_testz2Test_TestCase.test_run_call_order__failure_in_test�sK������v�&��	0�$�&�&�	0�
:���F�����������*rc���G�fd�dtj��gd�}g}�|�j�|j||�y)Nc�(���eZdZd�Z��fd�Z�xZS)�NTest_TestCase.test_run_call_order__failure_in_test_default_result.<locals>.Fooc�,�t|j�Srr�rs rrqz`Test_TestCase.test_run_call_order__failure_in_test_default_result.<locals>.Foo.defaultTestResult�r�rc�D��t�|��|jd�yr�r�r}s ��rr+zSTest_TestCase.test_run_call_order__failure_in_test_default_result.<locals>.Foo.test�r�rr�rs@�rr!r��s���
2�
0�
0rr!)r�r�r2r+r�r7r�r�r�)rr�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�I�����F����������*rc���g}t|�}G�fd�dtj���|�j|�gd�}|j	||�y)Nc�"���eZdZ��fd�Z�xZS)�ATest_TestCase.test_run_call_order__error_in_tearDown.<locals>.Fooc�6��t�|��td���Nzraised by Foo.tearDown�r,r7r|r}s ��rr7zJTest_TestCase.test_run_call_order__error_in_tearDown.<locals>.Foo.tearDown�����c�4�)�+�"�#;�<�<r)rrr r7r9rs@�rr!r�s
���
=�
=rr!)r�r2r+r7r�r�r�r�s    @r�&test_run_call_order__error_in_tearDownz4Test_TestCase.test_run_call_order__error_in_tearDownsM������v�&��	=�$�&�&�	=�
	�F������ �������*rc���G�fd�dtj��g}�|�j�gd�}|j||�y)Nc�(���eZdZd�Z��fd�Z�xZS)�PTest_TestCase.test_run_call_order__error_in_tearDown_default_result.<locals>.Fooc�,�t|j�Srr�rs rrqzbTest_TestCase.test_run_call_order__error_in_tearDown_default_result.<locals>.Foo.defaultTestResultr�rc�6��t�|��td��r�r�r}s ��rr7zYTest_TestCase.test_run_call_order__error_in_tearDown_default_result.<locals>.Foo.tearDownr�r)rrr rqr7r9rs@�rr!r�s���
2�
=�
=rr!)r�r�r2r+r7r�r�r�r�r�s   @r�5test_run_call_order__error_in_tearDown_default_resultzCTest_TestCase.test_run_call_order__error_in_tearDown_default_resultsA���	=�$�&�&�	=����F�����;�������*rc��Gd�dtj�}|jt�5|d�j	�ddd�y#1swYyxYw)Nc��eZdZd�Zd�Zy)�=Test_TestCase.test_run_call_order_default_result.<locals>.Fooc��t�Sr)r	rs rrqzOTest_TestCase.test_run_call_order_default_result.<locals>.Foo.defaultTestResult.s��:�<�<rc��yrrrs rr+zBTest_TestCase.test_run_call_order_default_result.<locals>.Foo.test0rnrN)rrr rqr+rrrr!r�-s��
=�
rr!r+)r:r;�assertWarns�RuntimeWarningrOrhs  r�"test_run_call_order_default_resultz0Test_TestCase.test_run_call_order_default_result+sG��	�(�#�#�	��
�
�n�
-�	���K�O�O��	�	�	�s�A�Ac�P��Gd�d��G�fd�dtj�}|jt�5}|d�j	�ddd�|jdt
j��|jdt
|j��|j|jt�|jt�5}|d�j	�ddd�|jdt
|j��|jdt
|j��|j|jt�|jt�5}|d�j	�ddd�|jdt
|j��|jdt
|j��|j|jt�y#1swY���xYw#1swY�� xYw#1swY��xYw)	Nc��eZdZd�Zy)�GTest_TestCase.test_deprecation_of_return_val_from_test.<locals>.Nothingc�
�|duSrr)r�os  r�__eq__zNTest_TestCase.test_deprecation_of_return_val_from_test.<locals>.Nothing.__eq__9s���D�y� rN)rrr r�rrr�Nothingr�8s��
!rr�c�$��eZdZd�Zd�Z�fd�Zy)�CTest_TestCase.test_deprecation_of_return_val_from_test.<locals>.Fooc��y�Nrfrrs rrzITest_TestCase.test_deprecation_of_return_val_from_test.<locals>.Foo.test1<s��rc3�K�d��y�wr�rrs rr%zITest_TestCase.test_deprecation_of_return_val_from_test.<locals>.Foo.test2>s������s�c�����Srr)rr�s �r�test3zITest_TestCase.test_deprecation_of_return_val_from_test.<locals>.Foo.test3@s����y� rN)rrr rr%r�)r�s�rr!r�;s���
�
�
!rr!rz3It is deprecated to return a value that is not Noner%r�)r:r;r��DeprecationWarningrO�assertIn�str�warningrJ�filename�__file__)rr!�wr�s   @r�(test_deprecation_of_return_val_from_testz6Test_TestCase.test_deprecation_of_return_val_from_test6s����	!�	!�	!�(�#�#�	!��
�
�0�
1�	�Q���L����	��
�
�K�S�QR�QZ�QZ�^�\��
�
�g�s�1�9�9�~�.�������X�.�
�
�
�0�
1�	�Q���L����	��
�
�K�S�QR�QZ�QZ�^�\��
�
�g�s�1�9�9�~�.�������X�.�
�
�
�0�
1�	�Q���L����	��
�
�K�S�QR�QZ�QZ�^�\��
�
�g�s�1�9�9�~�.�������X�.�!	�	��	�	��	�	�s#�H�H�8H�H�H�H%c���G�fd�dtj���|�j|�|j||�y)Nc�"���eZdZ��fd�Z�xZS)�6Test_TestCase._check_call_order__subtests.<locals>.Fooc	�:��t�|��dD]j}|j|��5|dk(r|jd�dD]1}|j|��5||zdk(rt	d��	ddd��3	ddd��ldd	zy#1swY�NxYw#1swY��xYw)
N�rfrIrH��irf�failure�rIrH��j�r�r)r,r+�subTestr^r|�rr�r�r!r0s   ��rr+z;Test_TestCase._check_call_order__subtests.<locals>.Foo.testWs�����c�4�%�'�"�M�A������*�M���6� �I�I�i�0�!'�M�A�!%�����!2�M�#$�q�5�A�:�*6�7K�*L�$L�$.�M�M�M�M�M�M��A��M�M��	M�M�s#�.B�B	�*
B�B
�
B�B	r�rs@�rr!r�Vs
���

�

rr!r��rrtr/�expected_eventsr!s    @r�_check_call_order__subtestsz)Test_TestCase._check_call_order__subtestsUs7���	�$�&�&�	�(	�F�����������1rc�L�g}t|�}gd�}|j|||�y)N)r�r2r+�addSubTestFailure�addSubTestSuccessr�r�r�r�r7r�)rr��rr/rtr�s    r�test_run_call_order__subtestsz+Test_TestCase.test_run_call_order__subtestsms-�����v�&��M��	
�(�(����Brc�L�g}t|�}gd�}|j|||�y)Nr�)rr�r�s    r�$test_run_call_order__subtests_legacyz2Test_TestCase.test_run_call_order__subtests_legacyvs,����$�V�,��:���(�(����Brc���G�fd�dtj���|�j|�|j||�y)Nc�"���eZdZ��fd�Z�xZS)�>Test_TestCase._check_call_order__subtests_success.<locals>.Fooc	����t�|��dD]A}|j|��5dD]}|j|��5	ddd�� 	ddd��Cy#1swY�6xYw#1swY�ZxYw)N)rfrIr�r�r�)r,r+r�r�s   ��rr+zCTest_TestCase._check_call_order__subtests_success.<locals>.Foo.test�s�����c�4�%�'��%�A������*�%�!'�%�A�!%�����!2�%� $�%�%�%�%�%�%�%�%��%�%�s"�A#�A	�
A#�A 
�A#�#A,	r�rs@�rr!r���
���
%�
%rr!r�r�s    @r�#_check_call_order__subtests_successz1Test_TestCase._check_call_order__subtests_successs7���	%�$�&�&�	%�	�F�����������1rc�d�g}t|�}gd�ddgzzgd�z}|j|||�y)N)r�r2r+r�r�)r7�
addSuccessr�)rr�r�s    r�%test_run_call_order__subtests_successz3Test_TestCase.test_run_call_order__subtests_success�sE�����v�&��3��.�/�/�0�<�=��	
�0�0����Jrc�L�g}t|�}gd�}|j|||�y)N)r�r2r+r7r�r�)rr�r�s    r�,test_run_call_order__subtests_success_legacyz:Test_TestCase.test_run_call_order__subtests_success_legacy�s*����$�V�,��.���0�0����Jrc���g}t|�}d|_G�fd�dtj��gd�}�|�j	|�|j||�y)NTc�"���eZdZ��fd�Z�xZS)�ATest_TestCase.test_run_call_order__subtests_failfast.<locals>.Fooc�$��t�|��|jd��5|jd�ddd�|jd��5|jd�ddd�|jd�y#1swY�GxYw#1swY�'xYw)Nrfr�r�rI)r,r+r�r^r}s ��rr+zFTest_TestCase.test_run_call_order__subtests_failfast.<locals>.Foo.test�sz����c�4�%�'��\�\�A�\�&�)��I�I�i�(�)��\�\�A�\�&�)��I�I�i�(�)��	�	�)�$�	)�)��)�)�s�A:�B�:B�Br�rs@�rr!r�r�rr!)r�r2r+r�r7r�)r�failfastrr-rOrJr�s    @r�&test_run_call_order__subtests_failfastz4Test_TestCase.test_run_call_order__subtests_failfast�sS������v�&�����	%�$�&�&�	%�A���F�����������*rc�
��g�G�fd�dtj�}tj�}d|_tj�j|�}|j
|�gd�}|j�|�y)Nc�,��eZdZ�fd�Z�fd�Z�fd�Zy)�1Test_TestCase.test_subtests_failfast.<locals>.Fooc���|j�5�jd�ddd��jd�y#1swY�xYw)N�a1�a2)r�r4�rr/s �r�test_az8Test_TestCase.test_subtests_failfast.<locals>.Foo.test_a�s9����\�\�^�(��M�M�$�'�(��
�
�d�#�(�(�s	�>�Ac���|j�5�jd�ddd�|j�5|jd�ddd��jd�y#1swY�ExYw#1swY�'xYw)N�b1r��b2)r�r4r^rs �r�test_bz8Test_TestCase.test_subtests_failfast.<locals>.Foo.test_b�sc����\�\�^�(��M�M�$�'�(��\�\�^�)��I�I�i�(�)��
�
�d�#�	(�(��)�)�s�A(�A4�(A1�4A=c�(���jd�y)N�c�r4rs �r�test_cz8Test_TestCase.test_subtests_failfast.<locals>.Foo.test_c�s����
�
�c�"rN)rrr rrr�r/s�rr!r
�s���
$�

$�
#rr!T)rr
r)r:r;rsr�
TestLoader�loadTestsFromTestCaserOrJ)rr!rt�suiter�r/s     @r�test_subtests_failfastz$Test_TestCase.test_subtests_failfast�sk�����	#�(�#�#�	#� �$�$�&������#�#�%�;�;�C�@��
�	�	�&��%�������*rc���g�G�fd�dtj�}|d�j�|j�ddg�y)Nc���eZdZ�fd�Zy)�.Test_TestCase.test_subtests_debug.<locals>.Fooc����jd�|j�5�jd�ddd�y#1swYyxYw)N�	test case�	subtest 1)r4r�rs �rrz5Test_TestCase.test_subtests_debug.<locals>.Foo.test_a�s9����
�
�k�*��\�\�^�/��M�M�+�.�/�/�/�s	�>�AN)rrr rrs�rr!r�s���
/rr!rr!r")r:r;�debugrJ)rr!r/s  @r�test_subtests_debugz!Test_TestCase.test_subtests_debug�sA�����	/�(�#�#�	/�	�H�
��������+�{�!;�<rc��Gd�dtj�}|j|d�jt�y)Nc��eZdZd�Zy)�9Test_TestCase.test_failureException__default.<locals>.Fooc��yrrrs rr+z>Test_TestCase.test_failureException__default.<locals>.Foo.test�rnrNrerrrr!r'�rprr!r+)r:r;�assertIsrM�AssertionErrorrhs  r�test_failureException__defaultz,Test_TestCase.test_failureException__default�s.��	�(�#�#�	�	
�
�
�c�&�k�2�2�N�Crc��g}t|�}Gd�dtj�}|j|d�jt
�|d�j
|�gd�}|j||�y)Nc��eZdZd�ZeZy)�MTest_TestCase.test_failureException__subclassing__explicit_raise.<locals>.Fooc��t��r)r|rs rr+zRTest_TestCase.test_failureException__subclassing__explicit_raise.<locals>.Foo.test�s
��"�n�$rN�rrr r+r|rMrrrr!r.�s��
%� ,�rr!r+�r�r�r��rr:r;r)rMr|rOrJ�rr/rtr!r�s     r�2test_failureException__subclassing__explicit_raisez@Test_TestCase.test_failureException__subclassing__explicit_raise��d�����v�&��	,�(�#�#�	,�	
�
�
�c�&�k�2�2�L�A�	�F������:�������*rc��g}t|�}Gd�dtj�}|j|d�jt
�|d�j
|�gd�}|j||�y)Nc��eZdZd�ZeZy)�MTest_TestCase.test_failureException__subclassing__implicit_raise.<locals>.Fooc�&�|jd�y�Nr)r^rs rr+zRTest_TestCase.test_failureException__subclassing__implicit_raise.<locals>.Foo.test	s���	�	�%� rNr0rrrr!r8s��
!� ,�rr!r+r1r2r3s     r�2test_failureException__subclassing__implicit_raisez@Test_TestCase.test_failureException__subclassing__implicit_raiser5rc�`�Gd�dtj�}|�j�y)Nc��eZdZd�Zy)�%Test_TestCase.test_setUp.<locals>.Fooc��yrrrs rrz-Test_TestCase.test_setUp.<locals>.Foo.runTestrnrNrorrrr!r>rprr!)r:r;r2rhs  r�
test_setUpzTest_TestCase.test_setUps!��	�(�#�#�	�
	����
rc�`�Gd�dtj�}|�j�y)Nc��eZdZd�Zy)�(Test_TestCase.test_tearDown.<locals>.Fooc��yrrrs rrz0Test_TestCase.test_tearDown.<locals>.Foo.runTest!rnrNrorrrr!rC rprr!)r:r;r7rhs  r�
test_tearDownzTest_TestCase.test_tearDowns"��	�(�#�#�	�
	����rc��Gd�dtj�}|j|�j�t�y)Nc��eZdZd�Zy)�"Test_TestCase.test_id.<locals>.Fooc��yrrrs rrz*Test_TestCase.test_id.<locals>.Foo.runTest/rnrNrorrrr!rH.rprr!)r:r;�assertIsInstancerKr�rhs  r�test_idzTest_TestCase.test_id-s.��	�(�#�#�	�	
���c�e�h�h�j�#�.rc�����g�t���G��fd�dtj�}|d�j�}|j	|��gd�}|j�|�y)Nc�"��eZdZ�fd�Z�fd�Zy)�;Test_TestCase.test_run__uses_defaultTestResult.<locals>.Fooc�(���jd�yr*rrs �rr+z@Test_TestCase.test_run__uses_defaultTestResult.<locals>.Foo.test>s����
�
�f�%rc����Srr)r�
defaultResults �rrqzMTest_TestCase.test_run__uses_defaultTestResult.<locals>.Foo.defaultTestResultAs	���$�$rN)rrr r+rq)rQr/s��rr!rN=s
���
&�
%rr!r+)r�r�r+r�r�r�)rr:r;rOr)rJ)rr!rtr�rQr/s    @@r� test_run__uses_defaultTestResultz.Test_TestCase.test_run__uses_defaultTestResult9s[�����%�f�-�
�	%�(�#�#�	%��V����"���
�
�f�m�,�'�������*rc��Gd�dtj�}tj�}|d�j|�}|j	||�y)Nc��eZdZd�Zy)�9Test_TestCase.test_run__returns_given_result.<locals>.Fooc��yrrrs rr+z>Test_TestCase.test_run__returns_given_result.<locals>.Foo.testQrnrNrerrrr!rUPrprr!r+)r:r;rsrOr))rr!rt�retvals    r�test_run__returns_given_resultz,Test_TestCase.test_run__returns_given_resultNsD��	�(�#�#�	��$�$�&���V�����(���
�
�f�f�%rc�����tj��tj��G��fd�dtj�}|d���}|j|��y)Nc� ��eZdZd�Z��fd�Zy)�KTest_TestCase.test_call__invoking_an_instance_delegates_to_run.<locals>.Fooc��yrrrs rr+zPTest_TestCase.test_call__invoking_an_instance_delegates_to_run.<locals>.Foo.testarnrc�,��|j|���Sr)r))rrt�resultIn�	resultOuts  ��rrOzOTest_TestCase.test_call__invoking_an_instance_delegates_to_run.<locals>.Foo.runds����
�
�f�h�/� � rN)rrr r+rO)r^r_s��rr!r[`s
���
�
!rr!r+)r:rsr;r))rr!rWr^r_s   @@r�0test_call__invoking_an_instance_delegates_to_runz>Test_TestCase.test_call__invoking_an_instance_delegates_to_run\sQ����&�&�(���'�'�)�	�	!�(�#�#�	!���V��X�&���
�
�f�i�(rc�B�|j|j��yr)�assertIsNone�shortDescriptionrs r�$testShortDescriptionWithoutDocstringz2Test_TestCase.testShortDescriptionWithoutDocstringms�����$�/�/�1�2rrIz)Docstrings are omitted with -O2 and abovec�D�|j|j�d�y)z7Tests shortDescription() for a method with a docstring.N�rJrcrs r�(testShortDescriptionWithOneLineDocstringz6Test_TestCase.testShortDescriptionWithOneLineDocstringps"��	
����%�%�'�I�	Krc�D�|j|j�d�y)z�Tests 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.Nrfrs r�*testShortDescriptionWithMultiLineDocstringz8Test_TestCase.testShortDescriptionWithMultiLineDocstringxs#��	
����%�%�'��	rc�D�|j|j�d�y)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 firstNrfrs r�&testShortDescriptionWhitespaceTrimmingz4Test_TestCase.testShortDescriptionWhitespaceTrimming�s"��	
����!�!�#�O�	Qrc���Gd�dt������}}|j||k(�d�fd�	}|j�|�|j||�y)Nc��eZdZdZy)�7Test_TestCase.testAddTypeEqualityFunc.<locals>.SadSnakez)Dummy class for test_addTypeEqualityFunc.N)rrr r8rrr�SadSnakern�s��;rroc�H��t|�t|�cxk(xr�k(ScSr)rr)�a�b�msgros   �r�AllSnakesCreatedEqualzDTest_TestCase.testAddTypeEqualityFunc.<locals>.AllSnakesCreatedEqual�s!�����7�d�1�g�1��1�1�1�1rr)�object�assertFalse�addTypeEqualityFuncrJ)r�s1�s2rtros    @r�testAddTypeEqualityFuncz%Test_TestCase.testAddTypeEqualityFunc�sT���	<�v�	<���X�Z�B������r��"�	2�� � ��+@�A�����R� rc��t�}|j||�|j|j|j|t��yr)rur)rLrM�r�things  r�testAssertIszTest_TestCase.testAssertIs�s7������
�
�e�U�#����$�/�/�����v�x�Prc��t�}|j|t��|j|j|j||�yr)ru�assertIsNotrLrMr|s  r�testAssertIsNotzTest_TestCase.testAssertIsNot�s;�����������)����$�/�/��1A�1A�5�%�Prc��g}|j|t�|j|j|j|t�yr)rJ�listrLrM�dictr|s  r�testAssertIsInstancez"Test_TestCase.testAssertIsInstance�s:�������e�T�*����$�/�/��1F�1F���	'rc��g}|j|t�|j|j|j|t�yr)�assertNotIsInstancer�rLrMr�r|s  r�testAssertNotIsInstancez%Test_TestCase.testAssertNotIsInstance�s:����� � ���-����$�/�/��1I�1I���	'rc���dddd�}|jdd�|jdgd��|jd	|�|jd
d�|jdgd��|jd|�|j|j|jd
d�|j|j|jdgd��|j|j|jd|�|j|j|jdd�|j|j|jdgd��|j|j|jd|�y)N�banana�grass�fish)�monkey�cow�sealrq�abcrIr�r��dr�otter�x��elephantrrfr�)r��assertNotInrLrM)r�animalss  r�testAssertInzTest_TestCase.testAssertIn�s*��%�g�v�F���
�
�c�5�!��
�
�a��#��
�
�h��(�����e�$�����I�&�����'�*����$�/�/�����U�K����$�/�/�����9�M����$�/�/����
�!�	#�	
���$�/�/��1A�1A�3��N����$�/�/��1A�1A�1�i�P����$�/�/��1A�1A�5�!�	#rc	���diifggft�t�ft�t�fg}|D]A\}}	|j||�	|j||d��	|j||d��Cd	gfit�ftd
dg�td
dg�ftd
d
g�tddg�ftdd
g�td
d
g�fg}|D]�\}}|j|j|j||�|j|j|j||d�|j|j|j||d����y#|j$r|j	d|�d|�d��Y��6wxYw#|j$r|j	d|�d|�d��Y��OwxYw#|j$r|j	d|�d|�d��Y���wxYw)N)rrzassertEqual(z, z) failedr�rsz) with msg= failedz) with third parameter failedrr�rfrI�rH)�set�	frozensetrJrMr^rL)r�equal_pairsrqrr�
unequal_pairss     r�testAssertEqualzTest_TestCase.testAssertEqual�s�����R���R���������i�k�*�,�� �	"�D�A�q�
A�� � ��A�&�
K�� � ��A�5� �1�
"�� � ��A�u�-�	"�$�B�x��C�E�{��Q�q�E�
�I�q��e�,�-��1�Q�%� �#�q��e�*�-��Q�q�E�
�C��1��J�'�)�
�"�	)�D�A�q����d�3�3�T�5E�5E�q�!�L����d�3�3�T�5E�5E�q�!�#�
%����d�3�3�T�5E�5E�q�!�"'�
�
)�		)��%�(�(�
A��	�	�!�Q�?�@�
A���(�(�
K��	�	�A�q�I�J�
K���(�(�
"��	�	��a�!�"�
"�s5�E�F�!F3�'F�F�'F0�/F0�3'G�Gc��|jgg�|jdd�|jgd�ddgg}g}|jtj
j|j||�|jtj
j|jt|�t|��|jtj
j|j|t|��|j|�|j||�|jt|�t|��|j|t|��|jt|�|�|j|j|j|t|��|j|j|jt|�|�|j|j|jd|�|j|j|jdt|��|j|j|jdt|��|j|j|jdd�|j|j|jdd�|j|j|jdd�|jii�ddi}i}|jtj
j|j||�|j|�|j||�d|d<|jtj
j|j||d�|j|j|jd|�|j|j|jg|�|j|j|jdd�y)Nrrrqrfr�zThese are unequal)�assertListEqual�assertTupleEqual�assertSequenceEqualrLr:r;rM�tuple�extend�assertDictEqual�update)rrqrrrr�s     r�testEqualityzTest_TestCase.testEquality�sE�����R��$����b�"�%�� � ��R�(�
��R�L�������(�+�+�<�<��.�.��1�	6����(�+�+�<�<��.�.��a��%��(�	D����(�+�+�<�<��2�2�A�u�Q�x�	A�	
��������Q��"����e�A�h��a��1�� � ��E�!�H�-�� � ��q��1�-����$�/�/��1E�1E��U�1�X�	'����$�/�/��1F�1F���(�A�	'����$�/�/��1E�1E�t�Q�O����$�/�/��1F�1F����(�	$����$�/�/��1I�1I���a��	*����$�/�/��1E�1E�q�!�L����$�/�/��1F�1F��1�M����$�/�/��1I�1I��Q�	 �	
���R��$��1�J�������(�+�+�<�<��.�.��1�	6�	
��������Q��"���#�����(�+�+�<�<��.�.��1�6I�	K�	
���$�/�/��1E�1E�t�Q�O����$�/�/��1E�1E�r�1�M����$�/�/��1E�1E�q�!�Lrc��|j|jd�dddzz}dddzz}djtjtj|�j�tj|�j���}tjjt|�dzfz}t|�dz|_	|j||�|jd	�|j!t�t|��|j#||�t|�dz|_	|j||�|jd	�|j%t|�t|��|j'||�d|_	|j||�|jd	�|j%t|�t|��|j'||�y#|j$r}|jd
}Yd}~��)d}~wwxYw#|j$r}|jd
}Yd}~��d}~wwxYw#|j$r}|jd
}Yd}~��d}~wwxYw)Ni�rqr�irr�
rfrIz!assertSequenceEqual did not fail.r)rJ�maxDiff�join�difflib�ndiff�pprint�pformat�
splitlinesr:�case�DIFF_OMITTED�lenr�r^rM�args�
assertLessr��
assertGreaterr�)r�seq1�seq2�diff�omitted�erss       r�testAssertSequenceEqualMaxDiffz,Test_TestCase.testAssertSequenceEqualMaxDiff"s	��������t�,��S�5�[� ���S�5�[� ���y�y����v�~�~�d�';�'F�'F�'H�'-�~�~�d�';�'F�'F�'H�J�K���-�-�,�,��D�	�A�
�/?�?���4�y�!�|���	;��$�$�T�4�0�
�I�I�9�:�����C��#�d�)�,��
�
�g�s�#��4�y�1�}���	;��$�$�T�4�0�
�I�I�9�:����3�s�8�S��Y�/�����#�&����	;��$�$�T�4�0�
�I�I�9�:����3�s�8�S��Y�/�����#�&��3�$�$�	��&�&��)�C��	���$�$�	��&�&��)�C��	���$�$�	��&�&��)�C��	�sH�G:�?H&� I�:H#�	H�H#�&I�5I	�	I�I9� I4�4I9c�X�d|_|jdd�}tjjtd�z}|j
|d|z�d|_|jdd�}|j
|d�d|_|jdd�}|j
|d�y)Nrfr�bar�foobarr�)r��_truncateMessager:r�r�r�rJ)r�messager�s   r�testTruncateMessagez!Test_TestCase.testTruncateMessageJs�������'�'��u�5���-�-�,�,�s�5�z�9������%�'�/�2�����'�'��u�5������(�+�����'�'��u�5������(�+rc��tjd�}d�}||_	|jiddi�|j	d�y#|j
$r%}|j
t|�d�Yd}~yd}~wwxYw)NrJc��yr:r�rsr�s  r�truncatez<Test_TestCase.testAssertDictEqualTruncates.<locals>.truncateZ���rrfrzassertDictEqual did not failr)r:r;r�r�r^rMrJr��rr+r�r�s    r�testAssertDictEqualTruncatesz*Test_TestCase.testAssertDictEqualTruncatesXsv��� � ��/��	� (���	6�� � ��a��V�,�
�I�I�4�5���$�$�	,����S��V�U�+�+��	,�s�A�A;�A6�6A;c��tjd�}d�}||_	|jdd�|j	d�y#|j
$r%}|j
t|�d�Yd}~yd}~wwxYw)NrJc��yr:rr�s  rr�zATest_TestCase.testAssertMultiLineEqualTruncates.<locals>.truncatefr�rrr�z!assertMultiLineEqual did not fail)r:r;r��assertMultiLineEqualr^rMrJr�r�s    r�!testAssertMultiLineEqualTruncatesz/Test_TestCase.testAssertMultiLineEqualTruncatesdsr��� � ��/��	� (���	;��%�%�e�U�3�
�I�I�9�:���$�$�	,����S��V�U�+�+��	,�s�A�A9�A4�4A9c�p�����j�jd�d�_�j�d�_�j��fd��d}�j	�j
�5}�j|dz|dz�ddd��j
dtj���j|dz|dz�d}d	�}�j�|�_	�j��fd
��|dz|dz}}�j	�j
�5}�j||�ddd��jdt|j���jt|j�|�d|����j|dz|dz�y#1swY��xYw#1swY�~xYw)Ni� c���t�d��S�N�_diffThreshold��setattr��
old_thresholdrs��r�<lambda>z=Test_TestCase.testAssertEqual_diffThreshold.<locals>.<lambda>y������.>�
� N�r�xxxxxxxxxxxxxxxxrqrr�^�@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxc��td��)Nzthis should not be raised)�SystemError)r�r�s  r�explodingTruncationzHTest_TestCase.testAssertEqual_diffThreshold.<locals>.explodingTruncation�s���9�:�:rc���t�d��S)Nr�r�)�old_truncaters��rr�z=Test_TestCase.testAssertEqual_diffThreshold.<locals>.<lambda>�s�����.@�,� O�rz != )rJr�r��
addCleanuprLrMr�r��	exceptionr�r�)r�s�cmr�rxryr�r�s`     @@r�testAssertEqual_diffThresholdz+Test_TestCase.testAssertEqual_diffThresholdps��������,�,�e�4�����+�+�
�"������N�O�
��
�
�
�t�4�4�
5�	/�����Q��W�a�#�g�.�	/��
�
�c�3�r�|�|�,�-�����S��!�c�'�*�
��	;��,�,�� 3������O�P��S��!�c�'�B��
�
�
�t�4�4�
5�	%�����R��$�	%�����c�"�,�,�/�0�����R�\�\�*�"�b�,A�B�����S��!�c�'�*�+	/�	/��"	%�	%�s�,F�F,�F)�,F5c�����j�d�_�j��fd��d}|dz|dz}}�j�j�5}�j	||�ddd�d}�j	tj�d|�d|�d	���j	|dz|dz�d
}|dz|z|dz|z}}�j�j�5}�j	||�ddd�d}�j	t|j�d|�d|�d|�d|�d�	�d
}|dz|z|dz|z}}�j�j�5}�j	||�ddd�d}d}�j	t|j�d|�d|�d|�d|�d�	�y#1swY��KxYw#1swY��xYw#1swY�YxYw)Nrc���t�d��Sr�r�r�s��rr�z7Test_TestCase.testAssertEqual_shorten.<locals>.<lambda>�r�r�dxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxrqrrzKxxxx[35 chars]xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx�'za' != 'zb'�2yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyzxxxx[85 chars]xxxxxxxxxxxz' != '�dyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyzxxxx[91 chars]xxxxxz6yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy[56 chars]yyyy)r�r�rLrMrJr�r�)	rr�rxryr�r�pr�r�s	`       @r�testAssertEqual_shortenz%Test_TestCase.testAssertEqual_shorten�s�����+�+�
�������N�O����S��!�c�'�B��
�
�
�t�4�4�
5�	%�����R��$�	%�'������R�\�\�*��1�,E�F�����S��!�c�'�*����S��1��a�#�g��k�B��
�
�
�t�4�4�
5�	%�����R��$�	%�'������R�\�\�*�A�q�!�Q�,O�P����S��1��a�#�g��k�B��
�
�
�t�4�4�
5�	%�����R��$�	%�!��'������R�\�\�*�A�q�!�Q�,O�P�'	%�	%��	%�	%��	%�	%�s$�F.� F;�G�.F8�;G�Gc
���t�}|jgd�gd��|jgd�gd��|j||dddg|dd|df�|jgd�gd��|j|j|jd	dgdgd
zzd	gd
zddgz�|j|j|jgd�gd��|j|j|jdgdd
g�|j|j|jdd
gdg�|j|j|jgd�dd
g�|jd	dgddgdgdddgd	dgg�|jt	d	dgddg�t	d	dgddg��|j|j|jgt
dd	ddt
�g�|jdd	iddigddidd	ig�|jd	dt
ggt
gdd	g�|j|j|jgt
gdd	ddt�g�|j|j|jd	ggdgg�|j|j|jgd�dd	g�|j|j|jgd�gd��|j|j|jd	ddiddgddiddg�ddhd	dhg}|ddd�}|j||�ttjjdd��}hd�}|j||�tjjggg�}|j|d	dgfg�ttjjdd��}hd�}|j||�y)Nr�)rHrIrf)rr��baz)r�r�rrIrH)rf�2rqrq)rqr�Trqrf�d)rqr�Trf�
�)r�r�r�r�rFr�y@y@rqrr)rfrfrI)rfrfr�rqrq)r�r�TrqT����aaabccd�abbbcce>�rrfr��rfrr��rfrHrr�rHrfrq)
ru�assertCountEqualrLrM�iter�divmodr�r�r:�util�_count_diff_all_purposerJ�_count_diff_hashable)rrqrr�diffsr�s     r�testAssertCountEqualz"Test_TestCase.testAssertCountEqual�s����H�����i��3����3�5J�K����q�!�Q��1�o��1�a��A��?����0�2G�H����$�/�/��1F�1F��a�&�A�3��9�,�q�c�C�i�1�a�&�.@�	B����$�/�/��1F�1F�,�.A�	C����$�/�/��1F�1F��$��R��	*����$�/�/��1F�1F��r�(�R�D�	*����$�/�/��1F�1F�&��R��	2�	
����1�v��1�v�q�1�E�A�q�6�A�q�6�3J�K����d�A�q�"�a��#3�4�"�A�q�"�a��#3�4�	6�	
���$�/�/��1F�1F��v�s�A�r�2�y�{�C�	E�	
����Q�x�#�q��2�c�1�X��Q�x�4H�I����q�#�v�r�2�V�R��a�4H�I����$�/�/��1F�1F��v�r�3��2�r�3�5�A�	C����$�/�/��1F�1F��3�%�1�#��	(�	
���$�/�/��1F�1F�#�a��V�	-����$�/�/��1F�1F�/�1F�	H����$�/�/��1F�1F��s�A�h��d�3�s�A�h��d�5K�	M�
��U�Q�q�E�N��
�d��d�G�����a��#��H�M�M�9�9�)�Y�O�P��?�������)��
�
�5�5�r�d�B�?������!�Q����-��H�M�M�6�6�y�)�L�M��?�������)rc��t�}t�}|j||�|j|j|jd|�|j|j|jg|�|j|j|j|d�|j|j|j|g�tdg�}t�}|j|j|j||�tdg�}tdg�}|j||�tdg�}tddg�}|j|j|j||�tdg�}t	ddg�}|j|j|j||�tddg�}t	ddg�}|j||�t�}d}|j|j|j||�|j|j|j||�tddg�}tdg�}|j|j|j||�y)Nrqrrr)rrfr�)r�r�)r��assertSetEqualrLrMr�)r�set1�set2s   r�testAssertSetEqualz Test_TestCase.testAssertSetEqual�s���u���u�����D�$�'����$�/�/��1D�1D�d�D�Q����$�/�/��1D�1D�b�$�O����$�/�/��1D�1D�d�D�Q����$�/�/��1D�1D�d�B�O��C�5�z���u�����$�/�/��1D�1D�d�D�Q��C�5�z���C�5�z�����D�$�'��C�5�z���C��:������$�/�/��1D�1D�d�D�Q��C�5�z���#�s��$�����$�/�/��1D�1D�d�D�Q��C��:����#�s��$�����D�$�'��u�������$�/�/��1D�1D�d�D�Q����$�/�/��1D�1D�d�D�Q��F�F�#�$���F�8�}�����$�/�/��1D�1D�d�D�Qrc��
�|jdd�|jdd�|jdd�|jdd�|jdd�|jdd�|j	|j
|jdd�|j	|j
|jdd�|j	|j
|jdd�|j	|j
|jdd�|j	|j
|jdd�|j	|j
|jdd�|jdd�|jdd�|jdd�|jdd�|jdd�|jdd�|j	|j
|jdd�|j	|j
|jdd�|j	|j
|jdd�|j	|j
|jdd�|j	|j
|jdd�|j	|j
|jdd�|jdd�|jdd�|jdd�|jdd�|jdd�|jdd�|j	|j
|jdd�|j	|j
|jdd�|j	|j
|jdd�|j	|j
|jdd�|j	|j
|jdd�|j	|j
|jdd�|jdd�|jdd�|jdd�|jdd�|jdd�|jdd�|j	|j
|jdd�|j	|j
|jdd�|j	|j
|jdd�|j	|j
|jdd�|j	|j
|jdd�|j	|j
|jdd�y)	NrIrfg�������?g�?�bug�antsbugsant)r��assertGreaterEqualr��assertLessEqualrLrMrs r�testInequalityzTest_TestCase.testInequalityst�����1�a� �����1�%�����1�%�����1�����Q��"����Q��"����$�/�/��1C�1C�Q��J����$�/�/��1C�1C�Q��J����$�/�/��1H�1H�!�Q�O����$�/�/����!�Q�G����$�/�/����!�Q�G����$�/�/��1E�1E�q�!�L�	
���3��$�����S�)�����S�)�����S�!����S�#�&����S�#�&����$�/�/��1C�1C�S�#�N����$�/�/��1C�1C�S�#�N����$�/�/��1H�1H�#�s�S����$�/�/����#�s�K����$�/�/����#�s�K����$�/�/��1E�1E�s�C�P�	
���5�%�(�����u�-�����u�-�����u�%����U�E�*����U�E�*����$�/�/��1C�1C�U�E�R����$�/�/��1C�1C�U�E�R����$�/�/��1H�1H�%�QV�W����$�/�/����%��O����$�/�/����%��O����$�/�/��1E�1E�u�e�T�	
���6�6�*������/������/������'����V�V�,����V�V�,����$�/�/��1C�1C�V�V�T����$�/�/��1C�1C�V�V�T����$�/�/��1H�1H�&� �	"����$�/�/����&�&�Q����$�/�/����&�&�Q����$�/�/��1E�1E�v�v�Vrc���d}d}d}d|_	|j||�y#|j$r:}t|�j	dd�d}|j||�Yd}~yd}~wwxYw)Nzxhttp://www.python.org/doc/2.3/lib/module-unittest.html
test case
    A test case is the smallest unit of testing. [...]
z�http://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�rMr��splitrJ�r�sample_text�revised_sample_text�sample_text_errorr��errors      r�testAssertMultiLineEqualz&Test_TestCase.testAssertMultiLineEqualQs{����
��
�����	7��%�%�k�3F�G���$�$�	7���F�L�L��q�)�!�,�E����.��6�6��	7�s�"�A+�0A&�&A+c���d}d}d}	|j||�y#|j$r:}t|�jdd�d}|j||�Yd}~yd}~wwxYw)Nzladen swallows fly slowly�unladen swallows fly quicklyzr- laden swallows fly slowly
?                    ^^^^
+ unladen swallows fly quickly
? ++                   ^^^^^
r�rf�rJrMr�rrs      r�testAssertEqualSingleLinez'Test_TestCase.testAssertEqualSingleLinepsn��1��<����	7����[�*=�>���$�$�	7���F�L�L��q�)�!�,�E����.��6�6��	7����A$�0A�A$c���d}d}d}	|j||�y#|j$r:}t|�jdd�d}|j||�Yd}~yd}~wwxYw)z�Verify when there is an empty string involved, the diff output
         does not treat the empty string as a single empty line. It should
         instead be handled as a non-line.
        �rz+ unladen swallows fly quickly
r�rfNrrs      r�testAssertEqualwithEmptyStringz,Test_TestCase.testAssertEqualwithEmptyString�sp��
��<����	7����[�*=�>���$�$�	7���F�L�L��q�)�!�,�E����.��6�6��	7�rc���d}d}d}	|j||�y#|j$r:}t|�jdd�d}|j||�Yd}~yd}~wwxYw)z�Verifying format of diff output from assertEqual involving strings
         with multiple lines, but missing the terminating newline on both.
        zladen swallows
fly sloely�laden swallows
fly slowlyzA  laden swallows
- fly sloely
?        ^
+ fly slowly
?        ^
r�rfNrrs      r�4testAssertEqualMultipleLinesMissingNewlineTerminatorzBTest_TestCase.testAssertEqualMultipleLinesMissingNewlineTerminator�sp��3��:����	7����[�*=�>���$�$�	7���F�L�L��q�)�!�,�E����.��6�6��	7�rc���d}d}d}	|j||�y#|j$r:}t|�jdd�d}|j||�Yd}~yd}~wwxYw)z�Verifying format of diff output from assertEqual involving strings
         with multiple lines and mismatched newlines. The output should
         include a - on it's own line to indicate the newline difference
         between the two strings
        zladen swallows
fly sloely
r!zD  laden swallows
- fly sloely
?        ^
+ fly slowly
?        ^
- 
r�rfNrrs      r�9testAssertEqualMultipleLinesMismatchedNewlinesTerminatorszGTest_TestCase.testAssertEqualMultipleLinesMismatchedNewlinesTerminators�sp��5��:����	7����[�*=�>���$�$�	7���F�L�L��q�)�!�,�E����.��6�6��	7�rc�(��tjjr�fd�}nd�}|�5�j�j�5�jdd�ddd�ddd�|�5�j
dd�ddd�ddg}ddg}|�5�j�j�5�j||�ddd�ddd�|�5�j�j�5�jt|�t|��ddd�ddd�|�5�j�j�5�j|t|��ddd�ddd�|�5�j�j�5�jt|�|�ddd�ddd�|�5�j�j�5�jdd�ddd�ddd�|�5�j�j�5�jt|�t|��ddd�ddd��j�j�5�j|t|��ddd��j�j�5�jt|�|�ddd�ddg}dg}�j�j�5�j||�ddd��j�j�5�jt|�t|��ddd��j�j�5�j|t|��ddd��j�j�5�jt|�|�ddd��j�j�5�jt|�t|��ddd�dg}ddg}�j�j�5�j||�ddd��j�j�5�jt|�t|��ddd��j�j�5�j|t|��ddd��j�j�5�jt|�|�ddd��j�j�5�jt|�t|��ddd�|�5�j�j�5�jddiddi�ddd�ddd��j�j�5�jiddi�ddd��j�j�5�jddii�ddd��j�j�5�jddggd��ddd�|�5�jddgddg�ddd�|�5�j�j�5�jddgddg�ddd�ddd�|�5�j�j�5�jddggddgg�ddd�ddd�y#1swY���xYw#1swY���xYw#1swY���xYw#1swY���xYw#1swY���xYw#1swY��TxYw#1swY��YxYw#1swY��xYw#1swY��$xYw#1swY���xYw#1swY���xYw#1swY���xYw#1swY���xYw#1swY���xYw#1swY���xYw#1swY��SxYw#1swY��!xYw#1swY���xYw#1swY���xYw#1swY���xYw#1swY��RxYw#1swY��xYw#1swY���xYw#1swY���xYw#1swY��zxYw#1swY��HxYw#1swY��
xYw#1swY���xYw#1swY���xYw#1swY���xYw#1swY���xYw#1swY��ZxYw#1swY��AxYw#1swY��xYw#1swY��xYw#1swY���xYw#1swYyxYw)Nc�0���jtd�S)Nz#Comparison between bytes and string)�assertWarnsRegex�BytesWarningrs�r�
bytes_warningz=Test_TestCase.testEqualityBytesWarning.<locals>.bytes_warning�s����,�,�\�A�C�Crc�*�tj�Sr)�
contextlib�	ExitStackrrrr)z=Test_TestCase.testEqualityBytesWarning.<locals>.bytes_warning�s��!�+�+�-�-rrq�ar)r-r-r-)�sys�flagsr)rLrMrJ�assertNotEqualr�r�r�r�rr�r�r�)rr)rqrrs`   r�testEqualityBytesWarningz&Test_TestCase.testEqualityBytesWarning�s�����9�9�"�"�
C�
.��_�	(�d�/�/��0E�0E�F�	(����S�$�'�	(�	(�
�_�	+�����T�*�	+���H��
��I��
�_�	'�d�/�/��0E�0E�F�	'�� � ��A�&�	'�	'�
�_�	6�d�/�/��0E�0E�F�	6��!�!�%��(�E�!�H�5�	6�	6�
�_�	2�d�/�/��0E�0E�F�	2��$�$�Q��a��1�	2�	2�
�_�	2�d�/�/��0E�0E�F�	2��$�$�U�1�X�q�1�	2�	2�
�_�	0�d�/�/��0E�0E�F�	0��$�$�S�$�/�	0�	0�
�_�	0�d�/�/��0E�0E�F�	0�����A���A��/�	0�	0��
�
�t�4�4�
5�	.�� � ��E�!�H�-�	.�
�
�
�t�4�4�
5�	/��!�!�%��(�A�.�	/���I��
�C��
�
�
�t�4�4�
5�	'�� � ��A�&�	'�
�
�
�t�4�4�
5�	6��!�!�%��(�E�!�H�5�	6�
�
�
�t�4�4�
5�	2��$�$�Q��a��1�	2�
�
�
�t�4�4�
5�	2��$�$�U�1�X�q�1�	2�
�
�
�t�4�4�
5�	0�����A���A��/�	0��C��
��I��
�
�
�t�4�4�
5�	'�� � ��A�&�	'�
�
�
�t�4�4�
5�	6��!�!�%��(�E�!�H�5�	6�
�
�
�t�4�4�
5�	2��$�$�Q��a��1�	2�
�
�
�t�4�4�
5�	2��$�$�U�1�X�q�1�	2�
�
�
�t�4�4�
5�	0�����A���A��/�	0��_�	6�d�/�/��0E�0E�F�	6�� � �#�q��D�!�9�5�	6�	6�
�
�
�t�4�4�
5�	0�� � ��d�A�Y�/�	0�
�
�
�t�4�4�
5�	0�� � �$���B�/�	0��
�
�t�4�4�
5�	D��!�!�4��,�0B�C�	D�
�_�	<��!�!�3��+��T�{�;�	<�
�_�	<�d�/�/��0E�0E�F�	<��!�!�3��*�t�T�l�;�	<�	<�
�_�	D�d�/�/��0E�0E�F�	D��!�!�3��R�.�4��r�2B�C�	D�	D�	D�A	(�	(��	(�	(��	+�	+��
	'�	'��	'�	'��	6�	6��	6�	6��	2�	2��	2�	2��	2�	2��	2�	2��	0�	0��	0�	0��	0�	0��	0�	0��	.�	.��	/�	/��
	'�	'��	6�	6��	2�	2��	2�	2��	0�	0��
	'�	'��	6�	6��	2�	2��	2�	2��	0�	0��	6�	6��	6�	6��	0�	0��	0�	0��	D�	D��	<�	<��	<�	<��	<�	<��	D�	D��	D�	D�s3�]�\4�]�2]�](�8]�](�"^�>%]5�#^�:^�^�2^�	^6�%^)�^6�_�4_�_�_*�:%_�_*�
_7�	`�`�%`�
`+�`8�%a�a�%a�a,�a9�%b�
b �&b�=b �(b-� b:�c�>c�$c.�c!�c.�.d�
c;�#d�4\>	�9]�]�]�]%	� ](�(]2�5]?	�:^�^�^	�^�^&�)^3	�.^6�6_�_
	�_�_�_'	�"_*�*_4�7`�`�`�`(�+`5�8a�a�a�a)�,a6�9b�b�b	�b � b*�-b7�:c�c�c�!c+	�&c.�.c8�;d	�d�dc���|jd�|j|j|jd�|jd�|j|j|jd�y)NFzDjZoPloGears on Rails)rbrLrM�assertIsNotNoners r�testAssertIsNonezTest_TestCase.testAssertIsNones[�����$�����$�/�/��1B�1B�E�J����4�5����$�/�/��1E�1E�t�Lrc�x�|jdd�|j|j|jdd�y)N�
asdfabasdfzab+�saaas�aaaa)�assertRegexrLrMrs r�testAssertRegexzTest_TestCase.testAssertRegexs5������v�.����$�/�/��1A�1A�!�7�	,rc�2��Gd�dt���fd�}|j�|�|jt�f|�|jttdd��|j|j�5|j�d��ddd�|jt
�5|j�d�ddd�|j��5|jt|�ddd�y#1swY�jxYw#1swY�FxYw#1swYyxYw)Nc��eZdZy)�=Test_TestCase.testAssertRaisesCallable.<locals>.ExceptionMockN�rrr rrr�
ExceptionMockr=���rr?c����d���N�	We expectr�r?s�r�Stubz4Test_TestCase.testAssertRaisesCallable.<locals>.Stub������,�,r�19���basec��y�Nrrrrrr�z8Test_TestCase.testAssertRaisesCallable.<locals>.<lambda>rr)�	ExceptionrLr_�intrM�	TypeError�rrEr?s  @r�testAssertRaisesCallablez&Test_TestCase.testAssertRaisesCallables����	�I�	�	-����-��.����:�}�5�t�<����*�c�4�a��8�
�
�
�t�4�4�
5�	8����m�Y�7�	8��
�
�y�
)�	3����m�T�2�	3��
�
�}�
-�	0����j�$�/�	0�	0�
	8�	8��	3�	3��	0�	0�s$�8C5�)D�D
�5C>�D
�
Dc�n��Gd�dt���fd�}|j��5|�ddd�|jt�f�5}|�ddd�|jj��|j|jjdd�|jt�5tdd��ddd�|j|j�5|j��5	ddd�ddd�|j|jd	�5|j�d	�
�5	ddd�ddd�|jtd	�5|j�d��5	ddd�ddd�|j��5|jt|�ddd�y#1swY���xYw#1swY��uxYw#1swY��xYw#1swY��xYw#1swY��xYw#1swY��xYw#1swY��xYw#1swY��xYw#1swY��xYw#1swYyxYw)
Nc��eZdZy)�<Test_TestCase.testAssertRaisesContext.<locals>.ExceptionMockNr>rrrr?rT(r@rr?c����d��rBrrDs�rrEz3Test_TestCase.testAssertRaisesContext.<locals>.Stub*rFrrrCrGrHrIr�r��*�r�)rMrLr_rJr�rJr�rNrM�assertRaisesRegexrO)rrEr�r?s   @r�testAssertRaisesContextz%Test_TestCase.testAssertRaisesContext's���	�I�	�	-�
�
�
�}�
-�	��F�	��
�
�
�M�:�
;�	�r��F�	�	
���b�l�l�M�:�������*�*�1�-�{�;�
�
�
�z�
*�	���1��	��
�
�t�4�4�
5�	��"�"�=�1�
��
�	��
#�
#�D�$9�$9�8�
D�	��"�"�=�h�"�?�
��
�	��
#�
#�I�x�
8�	��"�"�=��"�<�
��
�	��
�
�}�
-�	0����j�$�/�	0�	0�1	�	��	�	��	�	��
�
��	�	��

�
��	�	��

�
��	�	��	0�	0�s��F<�G	�8G�)G/�;G#�=G/�)H�=G;�?H�%H�9H�;H�H+�<G�	G�G �#G,	�(G/�/G8�;H	�H�H�H	�H�H(�+H4c�x�|jt�5|j�ddd�|jt�5|jd�ddd�|jt�5|jt�ddd�|jt�5|jtdf�ddd�|jt�5|jttf�ddd�y#1swY��xYw#1swY��xYw#1swY��xYw#1swY�gxYw#1swYyxYwr�)rLrOrur_rs r�testAssertRaisesNoExceptionTypez-Test_TestCase.testAssertRaisesNoExceptionTypeGs��
�
�
�y�
)�	 �����	 �
�
�
�y�
)�	!����a� �	!�
�
�
�y�
)�	&����f�%�	&�
�
�
�y�
)�	/����z�1�o�.�	/�
�
�
�y�
)�	4����z�6�2�3�	4�	4�	 �	 ��	!�	!��	&�	&��	/�	/��	4�	4�s;�D�D�3D�&D$�D0�D	�D�D!�$D-�0D9c��d�}tj|�}|jt|�|j	|tj|��y)Nc�6�	t�#t$rt�wxYwr)r_rrr�funcz4Test_TestCase.testAssertRaisesRefcount.<locals>.funcVs"��
!� � ���
!� � �
!�s��)r.�getrefcountrLr_rJ)rr^�refcounts   r�testAssertRaisesRefcountz&Test_TestCase.testAssertRaisesRefcountSs@��	!��?�?�4�(�����*�d�+�����3�?�?�4�#8�9rc���Gd�dt���fd�}|j�tjd�|�|j�d|�|j	t
�5|j�dd�ddd�y#1swYyxYw)Nc��eZdZy)�:Test_TestCase.testAssertRaisesRegex.<locals>.ExceptionMockNr>rrrr?rdar@rr?c����d��rBrrDs�rrEz1Test_TestCase.testAssertRaisesRegex.<locals>.StubdrFrzexpect$)rMrX�re�compilerLrOrPs  @r�testAssertRaisesRegexz#Test_TestCase.testAssertRaisesRegex`s|���	�I�	�	-�	
���}�b�j�j��.C�T�J����}�i��>�
�
�
�y�
)�	C��"�"�=�)�T�B�	C�	C�	C�s�$B�B
c	�V�|j|jd|jttjd�d��|j|jd|jtdd��|j|jd�5|jtdd��5	ddd�ddd�|jt
d�5|jtdd�	�5	ddd�ddd�y#1swY�SxYw#1swY�WxYw#1swY�*xYw#1swYyxYw)
Nz"^Exception not raised by <lambda>$r�c��yrrrrrr�z8Test_TestCase.testAssertNotRaisesRegex.<locals>.<lambda>prrc��yrrrrrr�z8Test_TestCase.testAssertNotRaisesRegex.<locals>.<lambda>trrr��expectr�rVrW)rXrMrMrfrgrOrs r�testAssertNotRaisesRegexz&Test_TestCase.testAssertNotRaisesRegexls������%�%�'K��&�&�	�2�:�:�c�?��	�	
����%�%�'K��&�&�	�3��	�
�
#�
#�D�$9�$9�8�
D�	��'�'�	�8��'�J�
��
�	��
#�
#�I�x�
8�	��'�'�	�8�B�'�G�
��
�	�	�
�
��	�	��

�
��	�	�sH�D�'C;�)D�D�(D�*D�;D	�D�D�D	�D�D(c�h�Gd�dt�}|jt|j|d��y)Nc��eZdZy)�>Test_TestCase.testAssertRaisesRegexInvalidRegex.<locals>.MyExcNr>rrr�MyExcrp�r@rrqc��y�NTrrrrr�zATest_TestCase.testAssertRaisesRegexInvalidRegex.<locals>.<lambda>�rr)rMrLrOrX)rrqs  r�!testAssertRaisesRegexInvalidRegexz/Test_TestCase.testAssertRaisesRegexInvalidRegex~s(��	�I�	����)�T�%;�%;�U�L�Qrc�h�Gd�dt�}|jt|j|d��y)Nc��eZdZy)�>Test_TestCase.testAssertWarnsRegexInvalidRegex.<locals>.MyWarnNr>rrr�MyWarnrw�r@rrxc��yrsrrrrr�z@Test_TestCase.testAssertWarnsRegexInvalidRegex.<locals>.<lambda>�rr)�WarningrLrOr')rrxs  r� testAssertWarnsRegexInvalidRegexz.Test_TestCase.testAssertWarnsRegexInvalidRegex�s(��	�W�	����)�T�%:�%:�F�L�Qrc�F�Gd�dtj�}|d�tjd<	|j	t
tjd�tjd=tjd=y#tjd=tjd=wxYw)Nc��eZdZed��Zy)�:Test_TestCase.testAssertWarnsModifySysModules.<locals>.Fooc�*�dtjd<y)Nr��@bar@)r.�modulesrs r�__warningregistry__zNTest_TestCase.testAssertWarnsModifySysModules.<locals>.Foo.__warningregistry__�s��',����G�$rN)rrr �propertyr�rrrr!r~�s��
�
-��
-rr!rz@foo@r�r�)�types�
ModuleTyper.r�r��UserWarning�warnings�warnrhs  r�testAssertWarnsModifySysModulesz-Test_TestCase.testAssertWarnsModifySysModules�sw��	-�%�"�"�	-�
 #�5�z����G��	%����[�(�-�-��D����G�$����G�$�����G�$����G�$�s�%A<�<$B c	���d�}|j|jd|jtd|�|j|jd|jttjd�|�y)Nc��td���N�
Unexpected)rMrrrrEz9Test_TestCase.testAssertRaisesRegexMismatch.<locals>.Stub�s
���L�)�)rz*"\^Expected\$" does not match "Unexpected"z
^Expected$)rXrMrMrfrg)rrEs  r�testAssertRaisesRegexMismatchz+Test_TestCase.testAssertRaisesRegexMismatch�sh��	*�	
����%�%�=��&�&�	�<��		�
	
����%�%�=��&�&�	��
�
�<�(�$�		0rc���Gd�dt���fd�}d}|j��}|5||�ddd�|j}|j|��|j	|j
d|�y#1swY�GxYw)Nc��eZdZy)�=Test_TestCase.testAssertRaisesExcValue.<locals>.ExceptionMockNr>rrrr?r��r@rr?c����|��rr)rr?s �rrEz4Test_TestCase.testAssertRaisesExcValue.<locals>.Stub�s�����$�$rzparticular valuer)rMrLr�rJrJr�)rrE�v�ctxr�r?s     @r�testAssertRaisesExcValuez&Test_TestCase.testAssertRaisesExcValue�sy���	�I�	�	%������
�.��
�	���G�	��M�M�����a��/���������A�&�		�	�s�	A:�:Bc��|jt�5|j�ddd�|jt�5|jt�ddd�|jt�5|jdd�ddd�|jt�5|jtd�ddd�|jt�5|jtdfd�ddd�|jt�5|jttfd�ddd�y#1swY��xYw#1swY��xYw#1swY��xYw#1swY��xYw#1swY�uxYw#1swYyxYw�Nrfrl)rLrOrXr_rurs r�$testAssertRaisesRegexNoExceptionTypez2Test_TestCase.testAssertRaisesRegexNoExceptionType�sA��
�
�
�y�
)�	%��"�"�$�	%�
�
�
�y�
)�	/��"�"�:�.�	/�
�
�
�y�
)�	0��"�"�1�h�/�	0�
�
�
�y�
)�	5��"�"�6�8�4�	5�
�
�
�y�
)�	>��"�"�J��?�H�=�	>�
�
�
�y�
)�	C��"�"�J��#7��B�	C�	C�	%�	%��	/�	/��	0�	0��	5�	5��	>�	>��	C�	C�sG�D7�E�7E�'E�E(�E4�7E�E
�E�E%�(E1�4E=c��d�}|jt|�|jt|�|jttf|�|jttjdt��|j|j�5|jtd��ddd�|jt�5|jtd�ddd�tj�5tjdt�|j|j�5|jt|�ddd�ddd�tj�5tjdt�|jt�5|jt|�ddd�ddd�y#1swY��xYw#1swY��xYw#1swY��xYw#1swY��xYw#1swY�CxYw#1swYyxYw)Nc�8�tjdt�yr:�r�r�r�rrr�
_runtime_warnz<Test_TestCase.testAssertWarnsCallable.<locals>._runtime_warn�����M�M�%��0rr��categoryc��yrLrrrrr�z7Test_TestCase.testAssertWarnsCallable.<locals>.<lambda>�rr�defaultr)
r�r�r�r�r�rLrMrO�catch_warnings�simplefilter�rr�s  r�testAssertWarnsCallablez%Test_TestCase.testAssertWarnsCallable�s���	1�	
�����7������7����,�n�=�}�M�����!�����	�	H��
�
�t�4�4�
5�	8����^�Y�7�	8��
�
�y�
)�	3����^�T�2�	3��
$�
$�
&�	D��!�!�)�^�<��"�"�4�#8�#8�9�
D�� � �!3�]�C�
D�	D��
$�
$�
&�	D��!�!�'�>�:��"�"�>�2�
D�� � �!3�]�C�
D�	D�	D�	8�	8��	3�	3��
D�
D��	D�	D��
D�
D��	D�	D�s`�G�G�:6G(�0G�G(�+0H�G4�2H�G
�G�G%	�!G(�(G1�4G=	�9H�H	c���d�}tj|�d}|jt�5}|�ddd�|jttf�5}|�ddd�|jjt�|j|jjdd�|jd|j�|j|j|dz�|jt�5|�|�ddd�|jt�5tjdt��ddd�|j|j�5|jt�5	ddd�ddd�|j!|jd�5|jtd��5	ddd�ddd�|j!t"d�5|jtd	�
�5	ddd�ddd�tj$�5tj&dt�|j|j�5|jt�5|�ddd�ddd�ddd�tj$�5tj&dt�|jt�5|jt�5|�ddd�ddd�ddd�y#1swY���xYw#1swY���xYw#1swY��!xYw#1swY���xYw#1swY���xYw#1swY���xYw#1swY���xYw#1swY���xYw#1swY��uxYw#1swY��zxYw#1swY��xYw#1swY��xYw#1swY��!xYw#1swY��xYw#1swY��xYw#1swYyxYw)
Nc�8�tjdt�yr:r�rrrr�z;Test_TestCase.testAssertWarnsContext.<locals>._runtime_warn�r�rrfrr�test_case.pyr�r�r�rVrWr�r)�inspect�getsourcelinesr�r�r�rJr�rJr�r�r��linenor�r�rLrMrXrOr�r��rr��_runtime_warn_linenor�s    r�testAssertWarnsContextz$Test_TestCase.testAssertWarnsContext�s=��	1�&�5�5�m�D�Q�G��
�
�
�n�
-�	���O�	��
�
�1�>�B�
C�	�r��O�	�	
���b�j�j�.�9����������+�U�3��
�
�n�b�k�k�2�������$8�1�$<�=�
�
�
�n�
-�	��O��O�	��
�
�n�
-�	:��M�M�%�.�9�	:��
�
�t�4�4�
5�	��!�!�.�1�
��
�	��
#�
#�D�$9�$9�8�
D�	��!�!�.�h�!�?�
��
�	��
#�
#�I�x�
8�	��!�!�.��!�<�
��
�	��
$�
$�
&�	$��!�!�)�^�<��"�"�4�#8�#8�9�
$��%�%�&8�9�$�!�O�$�
$�	$��
$�
$�
&�	$��!�!�'�>�:��"�"�>�2�
$��%�%�&8�9�$�!�O�$�
$�	$�	$�I	�	��	�	��	�	��	:�	:��
�
��	�	��

�
��	�	��

�
��	�	��$�$��
$�
$��	$�	$��$�$��
$�
$��	$�	$�s�L�L&�L3�1M�0M�M
�M�4M4�M'�M4�4N�N�N�26N5�(N(�>N�N(�N5�20O�"O�8O�O�O�L#�&L0�3L=�M
�
M	�M�M$�'M1	�,M4�4M>�N	�N�N�N%� N(�(N2	�-N5�5N?�O�O�O	�O�O#c��|jt�5|j�ddd�|jt�5|jd�ddd�|jt�5|jt�ddd�|jt�5|jtdf�ddd�|jt�5|jttf�ddd�|jt�5|jtt
f�ddd�y#1swY��xYw#1swY��xYw#1swY��xYw#1swY��xYw#1swY�txYw#1swYyxYwr�)rLrOr�rur�rMrs r�testAssertWarnsNoExceptionTypez,Test_TestCase.testAssertWarnsNoExceptionTypes:��
�
�
�y�
)�	�����	�
�
�
�y�
)�	 ����Q��	 �
�
�
�y�
)�	%����V�$�	%�
�
�
�y�
)�	/����k�1�-�.�	/�
�
�
�y�
)�	4����k�6�2�3�	4�
�
�
�y�
)�	7����k�9�5�6�	7�	7�	�	��	 �	 ��	%�	%��	/�	/��	4�	4��	7�	7�sG�D9�E�3E�&E�E*�E6�9E�E�E�E'�*E3�6E?c��d�}|jtd|d�|j|j�5|jtdd��ddd�|jt�5|jtdd�ddd�tj�5tjdt�|j|j�5|jtd|d�ddd�ddd�|j|j�5|jtd|d�ddd�tj�5tjdt�|jt|jf�5|jtd|d�ddd�ddd�y#1swY��hxYw#1swY��@xYw#1swY��xYw#1swY��xYw#1swY��xYw#1swY�PxYw#1swYyxYw)Nc�8�tj|t�yrr�r�s rr�zATest_TestCase.testAssertWarnsRegexCallable.<locals>._runtime_warn ����M�M�#�~�.r�o+�fooxc��yrLrrrrr�z<Test_TestCase.testAssertWarnsRegexCallable.<locals>.<lambda>'rrr��barzr)	r'r�rLrMrOr�r�r�r�r�s  r�testAssertWarnsRegexCallablez*Test_TestCase.testAssertWarnsRegexCallables���	/����n�d�+�V�	5��
�
�t�4�4�
5�	-��!�!�.�$�"+�
-�	-��
�
�y�
)�	>��!�!�.�$��=�	>��
$�
$�
&�	=��!�!�)�^�<��"�"�4�#8�#8�9�
=��%�%�&8�$�&3�V�=�
=�	=��
�
�t�4�4�
5�	9��!�!�.�$�"/��
9�	9��
$�
$�
&�	=��!�!�'�>�:��"�"�N�D�4I�4I�#J�K�
=��%�%�n�d�&3�V�=�
=�	=�	=�+	-�	-��	>�	>��
=�
=��	=�	=��	9�	9��
=�
=��	=�	=�sk�F6�-G�!6G�G�0G�G(�<H�G4�%H�6G�G
�G	�G�G%�(G1�4G=	�9H�H	c�R�d�}tj|�d}|jtd�5}|d�ddd�|j	j
t�|j
|j
jdd�|jd|j�|j
|j|dz�|j|j�5|jtd�5	ddd�ddd�|j|jd�5|jtdd��5	ddd�ddd�|jtd�5|jtdd	�
�5	ddd�ddd�tj �5tj"dt�|j|j�5|jt$d�5|d�ddd�ddd�ddd�|j|j�5|jtd�5|d�ddd�ddd�tj �5tj"d
t�|jt|jf�5|jtd�5|d�ddd�ddd�ddd�y#1swY���xYw#1swY���xYw#1swY��xYw#1swY���xYw#1swY���xYw#1swY���xYw#1swY���xYw#1swY��IxYw#1swY��NxYw#1swY��SxYw#1swY��xYw#1swY��"xYw#1swY��xYw#1swY��xYw#1swYyxYw)Nc�8�tj|t�yrr�r�s rr�z@Test_TestCase.testAssertWarnsRegexContext.<locals>._runtime_warnBr�rrfr�r�rr�r�r�rVrWr�r�r)r�r�r'r�rJr�rJr�r�r�r�rLrMrXrOr�r�r�r�r�s    r�testAssertWarnsRegexContextz)Test_TestCase.testAssertWarnsRegexContext@s��	/�&�5�5�m�D�Q�G��
�
"�
"�>�4�
8�	"�B��&�!�	"����b�j�j�.�9����������+�V�4��
�
�n�b�k�k�2�������$8�1�$<�=�
�
�
�t�4�4�
5�	��&�&�~�t�<�
��
�	��
#�
#�D�$9�$9�8�
D�	��&�&�~�t��&�J�
��
�	��
#�
#�I�x�
8�	��&�&�~�t�B�&�G�
��
�	��
$�
$�
&�	*��!�!�)�^�<��"�"�4�#8�#8�9�
*��*�*�+=�t�D�*�!�&�)�*�
*�	*��
�
�t�4�4�
5�	&��&�&�~�t�<�
&��f�%�
&�	&��
$�
$�
&�	*��!�!�'�>�:��"�"�N�D�4I�4I�#J�K�
*��*�*�>�4�@�*�!�&�)�*�
*�	*�	*�C	"�	"��
�
��	�	��

�
��	�	��

�
��	�	��*�*��
*�
*��	*�	*��
&�
&��	&�	&��*�*��
*�
*��	*�	*�s�	K)�"L�9K6�;L�'L�L�L�(L7�L*�L7�'6M�M�4	M�=M�M�0M8�	M+�M8�4<N�0N�	N�N�N�)K3�6L	�;L�L
�L	�L�L'�*L4	�/L7�7M�M�	M�M	�M�M(�+M5	�0M8�8N�N�
N�N	�N�N&c��|jt�5|j�ddd�|jt�5|jt�ddd�|jt�5|jdd�ddd�|jt�5|jtd�ddd�|jt�5|jtdfd�ddd�|jt�5|jttfd�ddd�|jt�5|jtt
fd�ddd�y#1swY��LxYw#1swY��&xYw#1swY��xYw#1swY��xYw#1swY��xYw#1swY��xYw#1swYyxYwr�)rLrOr'r�rurMrs r�#testAssertWarnsRegexNoExceptionTypez1Test_TestCase.testAssertWarnsRegexNoExceptionTypels~��
�
�
�y�
)�	$��!�!�#�	$�
�
�
�y�
)�	/��!�!�+�.�	/�
�
�
�y�
)�	/��!�!�!�X�.�	/�
�
�
�y�
)�	4��!�!�&�(�3�	4�
�
�
�y�
)�	>��!�!�;��"2�H�=�	>�
�
�
�y�
)�	C��!�!�;��"7��B�	C�
�
�
�y�
)�	F��!�!�;�	�":�H�E�	F�	F�	$�	$��	/�	/��	/�	/��	4�	4��	>�	>��	C�	C��	F�	F�sS�E1�E>�7F�'F�F$�F0�F<�1E;�>F�F�F!�$F-�0F9�<Gc#�K�t�5}d��ddd�|jj�d�y#1swY�*xYw�w)Nr)r
rJ�getvalue)r�bufs  r�assertNoStderrzTest_TestCase.assertNoStderr|s;����
�
�	�#��	���������,�	�	�s�A�;�)A�A�Ac��|jt|�t|��t||�D]Y\}}|j|tj
�|j
�D]!\}}|jt||�|��#�[yr)rJr��ziprJ�logging�	LogRecord�items�getattr)r�records�matches�rec�match�kr�s       r�assertLogRecordszTest_TestCase.assertLogRecords�sy������W��s�7�|�4��g�w�/�	5�J�C���!�!�#�w�'8�'8�9����
�
5���1�� � ���a��!�4�
5�	5rc�d�|j�5|j�5}tjd�tjd�ddd�|j
jdg�|j|jddig�ddd�y#1swY�NxYw#1swYyxYw)N�1r��
INFO:foo:1�namer)
r��
assertLogs�log_foo�info�
log_foobarr#rJ�outputr�r��rr�s  r�testAssertLogsDefaultsz$Test_TestCase.testAssertLogsDefaults�s���
�
 �
 �
"�	A����"�
&�b����S�!�� � ��%�
&�
���R�Y�Y���7��!�!�"�*�*����.?�@�	A�	A�
&�
&��	A�	A�s#�B&�+B�
AB&�B#	�B&�&B/c��|j�5|j�5}tjd�tjd�tjd�ddd�|jjddg�|j|jddiddig�ddd�y#1swY�RxYw#1swYyxYw)	Nr�r��3r��WARNING:quux:3r�rr�r�r�r�r�r�r#�log_quuxr�rJr�r�r�r�s  r�!testAssertLogsTwoMatchingMessagesz/Test_TestCase.testAssertLogsTwoMatchingMessages�s���
�
 �
 �
"�	H����"�
&�b����S�!�� � ��%�� � ��%�
&�
���R�Y�Y��7G�(H�I��!�!�"�*�*�%+�U�O�f�f�5E�#F�
H�
	H�	H�
&�
&��	H�	H�s$�B?�AB3�"AB?�3B<	�8B?�?Cc��|j�5|j|��5}tjd�tjd�tjd�ddd�|jjddg�|j|jddidd	ig�ddd�y#1swY�RxYw#1swYyxYw)
N��levelr�r�r�zERROR:foo.bar:2zCRITICAL:quux:3r�r
r)r�r�r�r�r�rr��criticalrJr�r�r�)rr�r�s   r�checkAssertLogsPerLevelz%Test_TestCase.checkAssertLogsPerLevel�s���
�
 �
 �
"�	L����u��-�
'������$�� � ��%��!�!�#�&�
'�
���R�Y�Y�):�<M�(N�O��!�!�"�*�*�%+�Y�$7�&�&�9I�#J�
L�
	L�	L�
'�
'��	L�	L�s$�C�AB5�$AC�5B>	�:C�C
c�d�|jtj�|jd�y)N�ERROR)r�r�r�rs r�testAssertLogsPerLevelz$Test_TestCase.testAssertLogsPerLevel�s"���$�$�W�]�]�3��$�$�W�-rc�$�|j�5|jd��5}|j|d��5}tjd�tjd�tjd�ddd�|jjddg�|j|jdd	idd
ig�ddd�|jjdg�ddd�y#1swY�wxYw#1swY�;xYw#1swYyxYw)N�DEBUGr�r�r�r�r�zDEBUG:foo.bar:2r�rr
r�r�)r�logger�outer_cmr�s    r�checkAssertLogsPerLoggerz&Test_TestCase.checkAssertLogsPerLogger�s��
�
 �
 �
"�
	B����w��/�
O�8��_�_�V�7�_�;�*�r��L�L��%��$�$�S�)��$�$�S�)�*�� � ����\�;L�,M�N��%�%�b�j�j�)/���&�)�9L�'M�O�

O�
���X�_�_�/?�.@�A�
	B�
	B�*�*��
O�
O��
	B�
	B�s;�D�C:�AC.�8AC:�%D�.C7�3C:�:D	�?D�Dc�n�|jtjd��|jd�yr:)r�r��	getLoggerrs r�testAssertLogsPerLoggerz%Test_TestCase.testAssertLogsPerLogger�s)���%�%�g�&7�&7��&>�?��%�%�e�,rc��|j�5|j|j�5|j�5	ddd�ddd�ddd�y#1swY�xYw#1swY�xYw#1swYyxYwr)r�rLrMr�rs r�testAssertLogsFailureNoLogsz)Test_TestCase.testAssertLogsFailureNoLogs�ss��
�
 �
 �
"�	��"�"�4�#8�#8�9�
��_�_�&����
�	�	����
�
��	�	�s9�A1�A%�A�A%�A1�A"�A%�%A.	�*A1�1A:c�&�|j�5|j|j�5|jd��5tjd�ddd�ddd�ddd�y#1swY�xYw#1swY�xYw#1swYyxYw�N�WARNINGr�r�)r�rLrMr�r�r�rs r�!testAssertLogsFailureLevelTooHighz/Test_TestCase.testAssertLogsFailureLevelTooHigh�s���
�
 �
 �
"�	&��"�"�4�#8�#8�9�
&��_�_�9�_�5�&��L�L��%�&�
&�	&�	&�&�&��
&�
&��	&�	&�s:�B�A;�A/�A;�B�/A8�4A;�;B	�B�Bc���|j�5tj}tjtj
�	|j
|j�5|jd��5tjd�ddd�ddd�tj|�	ddd�y#1swY�0xYw#1swY�4xYw#tj|�wxYw#1swYyxYwr�)
r�r�r��setLevelr��INFOrLrMr�r�)r�oldLevels  r�4testAssertLogsFailureLevelTooHigh_FilterInRootLoggerzBTest_TestCase.testAssertLogsFailureLevelTooHigh_FilterInRootLogger�s���
�
 �
 �
"�	+��}�}�H����W�\�\�*�
+��&�&�t�'<�'<�=�*����y��9�*����S�)�*�*�� � ��*�	+�	+�
*�*��*�*��� � ��*��	+�	+�sS�4C+�C�!C�4B9�
C�C�C+�9C�>C�C	�
C�C(�(C+�+C4c�*�|jdd��5|j|j�5|jd�5tj	d�ddd�ddd�ddd�y#1swY�xYw#1swY�xYw#1swYyxYw)Nrr�r�rr�)r�rLrMr�rrs r�&testAssertLogsFailureMismatchingLoggerz4Test_TestCase.testAssertLogsFailureMismatchingLogger�s����_�_�V�7�_�
3�	(��"�"�4�#8�#8�9�
(��_�_�U�+�(��N�N�3�'�(�
(�	(�	(�(�(��
(�
(��	(�	(�s:�B	�A=�A1�A=� B	�1A:�6A=�=B	�B	�	Bc��|jt�5|j�5td��#1swYnxYw	ddd�y#1swYyxYwr�)rL�ZeroDivisionErrorr�rs r�!testAssertLogsUnexpectedExceptionz/Test_TestCase.testAssertLogsUnexpectedException�sP��
�
�
�0�
1�	6����"�
6�'��5�5�
6�
6��
6�	6�	6�	6���A	�3�<	�A	�	Ac�L�|j|j�5}|j�5tj	d�t
j
d�ddd�ddd�|jtj�d�y#1swY�7xYw#1swY�;xYw)Nr�r�z%Unexpected logs found: ['INFO:foo:1'])
rLrM�assertNoLogsr�r�r�r#rJr�r�r�s  r�testAssertNoLogsDefaultz%Test_TestCase.testAssertNoLogsDefault�s���
�
�
�t�4�4�
5�	&���"�"�$�
&����S�!�� � ��%�
&�	&�	
��������3�	
�
&�
&��	&�	&��"�B�+B�B�B	�B�B#c�L�|j|j�5}|j�5tj	d�t
j	d�ddd�ddd�|j
tj�d�y#1swY�7xYw#1swY�;xYw)Nr�rz8Unexpected logs found: ['ERROR:quux:1', 'ERROR:foo:foo'])	rLrMrr�rr�rJr�r�r�s  r� testAssertNoLogsFailureFoundLogsz.Test_TestCase.testAssertNoLogsFailureFoundLogs�s���
�
�
�t�4�4�
5�	%���"�"�$�
%����s�#��
�
�e�$�
%�	%�
	
��������F�	
�	
%�
%��	%�	%�rc�"�|j�5|jt�5|jt��5tjd�ddd�ddd�ddd�y#1swY�xYw#1swY�xYw#1swYyxYw)N�r�r�)r�r�r�rr�rrs r�testAssertNoLogsPerLoggerz'Test_TestCase.testAssertNoLogsPerLogger�s{��
�
 �
 �
"�	(�����*�
(��&�&�g�&�6�(��N�N�3�'�(�
(�	(�	(�(�(��
(�
(��	(�	(�s9�B�A9�A-�A9�B�-A6�2A9�9B	�>B�Bc��|j|j�5}|jt�5|j	t
��5tj
d�tjd�ddd�ddd�ddd�|jtj�d�y#1swY�?xYw#1swY�CxYw#1swY�GxYw)Nrr�r�z)Unexpected logs found: ['INFO:foo.bar:2'])rLrMr�r�rr�rr�r�rJr�r�r�s  r� testAssertNoLogsFailurePerLoggerz.Test_TestCase.testAssertNoLogsFailurePerLoggers����
�
�t�4�4�
5�	)������*�
)��&�&�g�&�6�)��N�N�3�'��O�O�C�(�)�
)�	)�
	
��������7�	
�)�)��
)�
)��	)�	)�s:�C
�B>�	+B2�4B>�<C
�2B;�7B>�>C	�C
�
Cc���|j�5|jd��5tjd�tjd�ddd�ddd�y#1swY�xYw#1swYyxYw)Nr�r�rr�)r�rr�r�r�r#rs r�testAssertNoLogsPerLevelz&Test_TestCase.testAssertNoLogsPerLevelsf��
�
 �
 �
"�	$��"�"��"�1�
$����U�#����s�#�
$�	$�	$�
$�
$��	$�	$�s"�A,�+A �A,� A)	�%A,�,A5c�P�|j|j�5}|jd��5tj	d�t
j	d�ddd�ddd�|j
tj�d�y#1swY�7xYw#1swY�;xYw)Nr�r�rr�z8Unexpected logs found: ['DEBUG:foo:foo', 'DEBUG:quux:1'])	rLrMrr�r#r�rJr�r�r�s  r�testAssertNoLogsFailurePerLevelz-Test_TestCase.testAssertNoLogsFailurePerLevels���
�
�
�t�4�4�
5�	$���"�"��"�1�
$��
�
�e�$����s�#�
$�	$�	
��������F�	
�
$�
$��	$�	$�s"�B�+B�B�B	�B�B%c��|jt�5|j�5td��#1swYnxYw	ddd�y#1swYyxYwr�)rLr�rrs r�#testAssertNoLogsUnexpectedExceptionz1Test_TestCase.testAssertNoLogsUnexpectedException sR��
�
�
�0�
1�	6��"�"�$�
6�'��5�5�
6�
6��
6�	6�	6�	6�r�c�r�|j�5}	ddd�|j�y#1swY�xYwr)rrb)r�values  r�testAssertNoLogsYieldsNonez(Test_TestCase.testAssertNoLogsYieldsNone&s6��
�
�
�
 �	�E��	����%� �	�	�s�-�6c��gd�}|D],}|jt�5t||�ddd��.y#1swY�9xYw)z:Test that the deprecated fail* methods get removed in 3.12)�failIfEqual�failUnlessEqual�failUnlessAlmostEqual�failIfAlmostEqual�
failUnless�failUnlessRaises�failIf�assertNotEquals�assertEquals�assertAlmostEquals�assertNotAlmostEquals�assert_�assertDictContainsSubset�assertRaisesRegexp�assertRegexpMatchesN)rLrNr�)r�deprecated_names�deprecated_names   r�testDeprecatedFailMethodsz'Test_TestCase.testDeprecatedFailMethods+sM��
�� 0�	/�O��"�"�>�2�
/���o�.�
/�
/�	/�
/�
/�s	�
7�A	c�\�Gd�dtj�}|d�}t|�y)Nc��eZdZd�Zy)�0Test_TestCase.testDeepcopy.<locals>.TestableTestc��yrrrs r�testNothingz<Test_TestCase.testDeepcopy.<locals>.TestableTest.testNothing;rnrN)rrr r+rrr�TestableTestr):rprr,r+)r:r;r)rr,r+s   r�testDeepcopyzTest_TestCase.testDeepcopy8s)��	�8�,�,�	��M�*��	��rc�0�tjd�}ttjdz�D]b}tj
||��}tj|�}|j||�|jt�t���dy)NrOrf)�protocol)	r:r;�range�pickle�HIGHEST_PROTOCOL�dumps�loadsrJr�)rr+r/�pickled_test�unpickled_tests     r�
testPicklezTest_TestCase.testPickleCsy��
� � ��'���f�5�5��9�:�		5�H�"�<�<��x�@�L�#�\�\�,�7�N����T�>�2�
�&�&�s�u�c�e�4�		5rc����dd��d��G�fd�dtj�}G��fd�dtj�}G��fd�dtj�}G�fd	�d
tj�}||||fD]6}|jt�5|d�j	�ddd��8y#1swY�CxYw)
Nc��t�r)�KeyboardInterruptrs r�_raisez3Test_TestCase.testKeyboardInterrupt.<locals>._raiseUs��#�#rc��yrrrs r�nothingz4Test_TestCase.testKeyboardInterrupt.<locals>.nothingW���rc���eZdZW�Zy)�2Test_TestCase.testKeyboardInterrupt.<locals>.Test1N�rrr �test_something�r;s�r�Test1r@Z����#�NrrDc���eZdZW�ZW�Zy)�2Test_TestCase.testKeyboardInterrupt.<locals>.Test2N�rrr r2rB�r;r=s��r�Test2rG]�
����E�$�NrrJc���eZdZW�ZW�Zy)�2Test_TestCase.testKeyboardInterrupt.<locals>.Test3N�rrr rBr7rIs��r�Test3rMa�
���$�N��HrrOc���eZdZ�fd�Zy)�2Test_TestCase.testKeyboardInterrupt.<locals>.Test4c�(��|j��yr�r��rr;s �rrBzATest_TestCase.testKeyboardInterrupt.<locals>.Test4.test_somethingf��������'rNrArCs�r�Test4rRe����
(rrWrBr)r:r;rLr:rO)rrDrJrOrW�klassr;r=s      @@r�testKeyboardInterruptz#Test_TestCase.testKeyboardInterruptTs����	$�	�	$�H�%�%�	$�	%�H�%�%�	%�	�H�%�%�	�	(�H�%�%�	(��U�E�5�1�	.�E��"�"�#4�5�
.��&�'�+�+�-�
.�
.�	.�
.�
.�s�B8�8C	c�����d
d��d��G�fd�dtj�}G��fd�dtj�}G��fd�dtj�}G�fd	�d
tj�}||||fD]n}tj�}|d�j|�|j	t|j�d�|j	|jd��py)Nc�,�tjd��)Nzsome reason)r:�SkipTestrs r�_skipz3Test_TestCase.testSkippingEverywhere.<locals>._skipns���#�#�M�2�2rc��yrrrs rr=z5Test_TestCase.testSkippingEverywhere.<locals>.nothingpr>rc���eZdZW�Zy)�3Test_TestCase.testSkippingEverywhere.<locals>.Test1NrA�r^s�rrDrass���"�NrrDc���eZdZW�ZW�Zy)�3Test_TestCase.testSkippingEverywhere.<locals>.Test2NrH�r^r=s��rrJrdvs
����E�$�NrrJc���eZdZW�ZW�Zy)�3Test_TestCase.testSkippingEverywhere.<locals>.Test3NrNres��rrOrgzs
���$�N��HrrOc���eZdZ�fd�Zy)�3Test_TestCase.testSkippingEverywhere.<locals>.Test4c�(��|j��yrrT)rr^s �rrBzBTest_TestCase.testSkippingEverywhere.<locals>.Test4.test_somethings�������&rNrArbs�rrWri~s���
'rrWrBrfr)r:r;rsrOrJr��skipped�testsRun)	rrDrJrOrWrYrtr^r=s	       @@r�testSkippingEverywherez$Test_TestCase.testSkippingEverywherems����	3�	�	#�H�%�%�	#�	%�H�%�%�	%�	�H�%�%�	�	'�H�%�%�	'��U�E�5�1�	1�E��(�(�*�F��"�#�'�'��/����S����0�!�4����V�_�_�a�0�		1rc�����d
d��d��G�fd�dtj�}G��fd�dtj�}G��fd�dtj�}G�fd	�d
tj�}||||fD]n}tj�}|d�j|�|j	t|j�d�|j	|jd��py)Nc��t�r)�
SystemExitrs rr;z,Test_TestCase.testSystemExit.<locals>._raise�s���rc��yrrrs rr=z-Test_TestCase.testSystemExit.<locals>.nothing�r>rc���eZdZW�Zy)�+Test_TestCase.testSystemExit.<locals>.Test1NrArCs�rrDrs�rErrDc���eZdZW�ZW�Zy)�+Test_TestCase.testSystemExit.<locals>.Test2NrHrIs��rrJru�rKrrJc���eZdZW�ZW�Zy)�+Test_TestCase.testSystemExit.<locals>.Test3NrNrIs��rrOrw�rPrrOc���eZdZ�fd�Zy)�+Test_TestCase.testSystemExit.<locals>.Test4c�(��|j��yrrTrUs �rrBz:Test_TestCase.testSystemExit.<locals>.Test4.test_something�rVrNrArCs�rrWry�rXrrWrBrfr)r:r;rsrOrJr��errorsrl)	rrDrJrOrWrYrtr;r=s	       @@r�testSystemExitzTest_TestCase.testSystemExit�s����	�	�	$�H�%�%�	$�	%�H�%�%�	%�	�H�%�%�	�	(�H�%�%�	(��U�E�5�1�	1�E��(�(�*�F��"�#�'�'��/����S����/��3����V�_�_�a�0�		1rc���tj�}tj|�}t	j
�5~|j
|��ddd�y#1swYyxYwr)r:r;�weakref�refr�
disable_gcrv)rr��wrs   r�testNoCycleszTest_TestCase.testNoCycles�sR��� � �"��
�[�[��
��
�
�
�
!�	#�����R�T�"�	#�	#�	#�s�A�A(c����G�fd�dt��G�fd�dtj�}dD]@}||�}|j�t	�|j�jd��By)Nc�&��eZdZdZ�fd�Z�fd�Zy)�9Test_TestCase.test_no_exception_leak.<locals>.MyExceptionrc�Z���xjdz
c_tj|�yr�)�	ninstancerMr.�rrCs �rr.zBTest_TestCase.test_no_exception_leak.<locals>.MyException.__init__�s"����%�%��*�%��"�"�4�(rc�0���xjdzc_yr�)r�r�s �r�__del__zATest_TestCase.test_no_exception_leak.<locals>.MyException.__del__�s����%�%��*�%rN)rrr r�r.r�rBs�rrCr��s����I�
)�
+rrCc�@��eZdZ�fd�Zej
�fd��Zy)�6Test_TestCase.test_no_exception_leak.<locals>.TestCasec������rrr�s �rrz<Test_TestCase.test_no_exception_leak.<locals>.TestCase.test1�s���!�m�#rc������rrr�s �rr%z<Test_TestCase.test_no_exception_leak.<locals>.TestCase.test2�s���!�m�#rN)rrr rr:�expectedFailurer%rBs�rr;r��s"���
$��
%�
%�
$�&�
$rr;)rr%r)rMr:r;rOrrJr�)rr;�method_name�testcaserCs    @r�test_no_exception_leakz$Test_TestCase.test_no_exception_leak�s`���	+�)�	+�	$�x�(�(�	$�.�	7�K���,�H��L�L�N��L����[�2�2�A�6�		7rN)~rrr rr!�eq_pairsr&�ne_pairsrPrWr`rirur�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrr$r+r4r;r@rErKrRrXr`rdr:�skipIfr.r/�optimizergrirkrzr~r�r�r�r�r�r�r�r�r�r�r�r�rr	rrrrr"r$r1r4r:rQrYr[rarhrmrtr{r�r�r�r�r�r�r�r�r�r�r+�contextmanagerr�r�r�r�r�r�r�r�r�r�r�r�r�rrrr
rrrrr&r-r7rZrmr|r�cpython_onlyr�r�rrrr=r=9s~�����'�"�D�H�H�W�$5�6�7�H����'�"�D�H�H�Y�$7�8����'�"�D�H�H�W�$5�6����'�"�D�H�H�W�$5�6�8�H�"�*@�
4�:�<�+�+�.+� +�.+�
+�,+�
+�"	�/�>2�0C�C�2�K�K�+�&+�8=�&D�+�.+�$��/�+�*	&�)�"3��X�_�_�S�Y�Y�'�'�1�,�@�B�K�B�K��X�_�_�S�Y�Y�'�'�1�,�@�B�
�B�
��X�_�_�S�Y�Y�'�'�1�,�@�B�Q�B�Q�!�Q�
Q�
'�'�#�*#)�J2M�h&'�P,�
6�
;�"+�HQ�:<*�|&R�P8W�t7�>7� 7�"7�(7�.JD�XM�,�
0�(0�@
4�:�
C��$R�R�%�
0�
'�C�D�:.$�`7�=�B**�XF� ���-��-�
5�A�	H�	L�.�B�-��&�
+�(�6�
�	
�(�
�$�	
�6�!�
/�	�5�".�21�61�6
���#��#�7rr=�__main__)#r+r�r�r1rfr.r�r�r~r�r��copyrr+rr:�test.test_unittest.supportrrrrr	�test.supportr
rr�r�r�r�rurr;r=r�mainrrr�<module>r�s�����
�
�	�
�����������5��'�
�
�E�
"��
�W�
�
�y�
)�
��7���V�$��+�6�+�6K7�H�%�%�|�[�K7�\<�z���H�M�M�O�r