HEX
Server: Microsoft-IIS/10.0
System: Windows NT ITPWINWEBSVR22 10.0 build 20348 (Windows Server 2022) AMD64
User: www.conferencesearch.co.uk (0)
PHP: 8.3.30
Disabled: NONE
Upload Files
File: D:/Python311/Lib/test/__pycache__/test_sys_settrace.cpython-311.opt-2.pyc
�

��Vc><����ddlmZddlZddlmZddlZddlZddlZddlm	Z	ddl
Z
ddlmZej
d���Gd�d	��ZGd
�d��Zd�Zd
�Zgd�e_d�Zgd�e_d�Zgd�e_d�Zgd�e_d�Zgd�e_d�Zgd�e_d�Zgd�e_d�Zd�Zgd�e_d�Zd�Zgd�e_d �Zd!�Zd"ge_d#�Zd$�Z gd%�e _d&�Z!gd'�e!_d(�Z"gd)�e"_d*�Z#gd+�e#_d,�Z$d-�Z%gd.�d/d0gd1zzd/d2gze%_Gd3�d4��Z&Gd5�d6ej'��Z(gd7�Z)Gd8�d9e(��Z*ej+Gd:�d;e(����Z,Gd<�d=ej'��Z-Gd>�d?��Z.d@�Z/dA�Z0GdB�dCej'��Z1GdD�dEej'��Z2GdF�dGej'��Z3e4dHkrej5��dSdS)I�)�supportN)�	MagicMock��wraps)�
import_helperT)�modulec�"�eZdZ	d�Zd�Zd�ZdS)�tracecontextc�"�||_||_dS�N��output�value��selfrrs   �*D:\Python311\Lib\test\test_sys_settrace.py�__init__ztracecontext.__init__��������
�
�
�c�D�|j�|j��dSr�r�appendr�rs r�	__enter__ztracecontext.__enter__s ������4�:�&�&�&�&�&rc�F�|j�|j��dSrr�r�exc_infos  r�__exit__ztracecontext.__exit__s"������D�J�;�'�'�'�'�'rN)�__name__�
__module__�__qualname__rrr�rrr
r
sD������9����'�'�'�(�(�(�(�(rr
c�"�eZdZ	d�Zd�Zd�ZdS)�asynctracecontextc�"�||_||_dSrr
rs   rrzasynctracecontext.__init__rrc��HK�|j�|j��dSrrrs r�
__aenter__zasynctracecontext.__aenter__!s$��������4�:�&�&�&�&�&rc��JK�|j�|j��dSrrrs  r�	__aexit__zasynctracecontext.__aexit__$s&��������D�J�;�'�'�'�'�'rN)rr r!rr'r)r"rrr$r$sD������H����'�'�'�(�(�(�(�(rr$c� K�	|D]}|WV��dSrr")�iterable�xs  r�	asynciterr-'s/����:�
�����������rc��dS�N�r"r"rr�basicr1.s���1r)�r�call�r0�line�r0�returnc��d}~	d}dSr/r"�r,s r�arigo_example0r:=���	�A�	�
�	�A�A�Ar)r2r4��r5��r5��r5�rAr7c��d}~	d}dSr/r"r9s r�arigo_example1rDKr;rc��d}~	d}dSr/r"r9s r�arigo_example2rFYs��	�A�	�
�
���4r)r2r4r<r>��r5��r5�rJr7c��d}~d}dSr/r"r9s r�one_instr_linerMls��	�A�	�	�A�A�Ar�r2r4r<r>�r?r7c�<�d}td��D]	}|rd}�d}�
dS�Nr0r=��range)r,�as  r�no_pop_topsrUws<��	�A�
�1�X�X�����	��A�A��A�A�	�r)
r2r4r<r>��r5r<r>rGr<�r=r7c�$�d}|s	t|�	d}dSr/)�bla)�yr,s  r�
no_pop_blocksr\�s'��	�A�������	�A�A�Ar�r2r4r<rG�rHr7c�
�d}dSr/r"r9s r�calledr`�s��	�A�A�Arc�"�t��dSr)r`r"rrr3r3�s��
�H�H�H�H�Hr)r2r4����r3����r5�rer7r6c��t�r��	Exceptionr"rr�raisesrj�s��
�Orc�F�	t��dS#t$rYdSwxYwr)rjrir"rr�
test_raiserl�s6��
���������
�
�
����
���s��
 � )r2r4r<rbrd�re�	exceptionrf�r=rnr>rGr^c�h�tj|��|tj��j_dSr)�sys�settrace�	_getframe�f_back�f_trace��	tracefuncs r�_settrace_and_returnrx�s)���L�����%.�C�M�O�O��"�"�"rc�$�t|��dSr)rxrvs r�settrace_and_returnrz�s����#�#�#�#�#rr6c�r�tj|��|tj��j_t
�r)rqrrrsrtru�RuntimeErrorrvs r�_settrace_and_raiser}�s)���L�����%.�C�M�O�O��"�
�rc�H�	t|��dS#t$rYdSwxYwr)r}r|rvs r�settrace_and_raiser�s=��
��I�&�&�&�&�&���
�
�
����
���s��
!�!)ror>rGr^c�(�d}d}||kr|dz}dSdS)NrAr0r")rT�bs  r�ireturn_exampler��s*��	�A�	�A��A�v�
�
�a�C�����r�r2r4r<r>rGr^c�h�tdd��}	d}	||}|dz
}�#t$rYdSwxYw)Nrr?r0�rS�
IndexError)�items�ir�s   r�tightloop_exampler��sV���!�Q�K�K�E�
�
��	��a��A�!�Q�$�!�	���
�
�
����
���s�#�
1�1)r2r4r<r>rGr@rGr@rGr@rGr@)rArnrVrIrKc�\�tdd��}	d}||}�	#t$rYdSwxYw)Nr0rHrr�)r�r�s  r�tighterloop_exampler�sG���!�Q�K�K�E�
�
���1�X�����
�
�
����
���s��
+�+)r2r4r<r>rGrGrGrG)rHrnr@rV�rWr7c#� K�	dV�	dS#wxYw)NTr"r"rr�generator_functionr�s%������
�
�
���	��	�	�	�	s��
c�d�tt����}td��D]}|}�dS)N�
)�anyr�rS)r,r[s  r�generator_exampler�s>���� � �!�!�A��2�Y�Y����
����r)
r2r<����r3����r5����r5�r�r7)r�r3�r�rn����r5�r�r7r@rVr�rBc�(�eZdZdd�Zd�Zd�Zd�ZdS)�TracerNc�0�||_||_g|_dSr)�trace_line_events�trace_opcode_events�events)rr�r�s   rrzTracer.__init__3s��!2���#6�� �����rc�V�|j�|j|_|j�|j|_dSdSr)r��
f_trace_linesr��f_trace_opcodes)r�frames  r�_reconfigure_framezTracer._reconfigure_frame8s>���!�	9�"&�"8�E���#�	=�$(�$<�E�!�!�!�	=�	=rc�|�|�|��|j�|j|f��|jSr�r�r�r�f_lineno�trace�rr��event�args    rr�zTracer.trace>s;������&�&�&�����E�N�E�2�3�3�3��z�rc��|�|��d�dD��|j�|j|f��|jS)Nc3�K�|]}|V��dSrr")�.0�os  r�	<genexpr>z)Tracer.traceWithGenexp.<locals>.<genexpr>Es"������q�������r�r0r�r�s    r�traceWithGenexpzTracer.traceWithGenexpCsO������&�&�&���C���������E�N�E�2�3�3�3��z�r)NN)rr r!rr�r�r�r"rrr�r�2sU����������
=�=�=����
����rr�c���eZdZd�Zd�Zed���Zd�Zd�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)d'�Z*d(�Z+d)�Z,d*�Z-d+�Z.d,�Z/d-�Z0d.�Z1d/�Z2d0�Z3d1�Z4d2�Z5d3�Z6d4�Z7d5�Z8d6�Z9d7�Z:d8�Z;d9�Z<d:�Z=d;�Z>d<�Z?d=�Z@d>�ZAd?�ZBd@�ZCdA�ZDdB�ZEdC�ZFeGjHdD���ZIdE�ZJdFS)G�
TraceTestCasec��tj��|_tj��|�t
jtj����dSr)�gc�	isenabled�using_gc�disable�
addCleanuprqrr�gettracers r�setUpzTraceTestCase.setUpNs<�������
�
�
���������c�l�n�n�5�5�5�5�5rc�>�|jrtj��dSdSr)r�r��enablers r�tearDownzTraceTestCase.tearDownSs%���=�	��I�K�K�K�K�K�	�	rc� �	t��Sr�r�r"rr�make_tracerzTraceTestCase.make_tracerWs��N��x�x�rc
�����fd�|D��}||krT|�dd�tjd�|D��d�|D������z��dSdS)Nc�$��g|]\}}|�z
|f��
Sr"r")r��l�e�line_offsets   �r�
<listcomp>z0TraceTestCase.compare_events.<locals>.<listcomp>]s&���<�<�<�6�A�q�1�{�?�A�&�<�<�<rz"events did not match expectation:
�
c�,�g|]}t|����Sr"��str�r�r,s  rr�z0TraceTestCase.compare_events.<locals>.<listcomp>as��(I�(I�(I�A��Q���(I�(I�(Irc�,�g|]}t|����Sr"r�r�s  rr�z0TraceTestCase.compare_events.<locals>.<listcomp>bs��(@�(@�(@�A��Q���(@�(@�(@r)�fail�join�difflib�ndiff)rr�r��expected_eventss `  r�compare_eventszTraceTestCase.compare_events\s����<�<�<�<�V�<�<�<���_�$�	D��I�I�5��	�	�'�-�(I�(I��(I�(I�(I�(@�(@��(@�(@�(@�B�B�C�C�C�
D�
D�
D�
D�
D�	D�	Drc���|���}tj|j��|��tjd��|�|jj|j|��dSr)r�rqrrr�r��__code__�co_firstlinenor�)r�funcr��tracers    r�run_and_comparezTraceTestCase.run_and_comparedsp���!�!�#�#����V�\�"�"�"��������T�������D�M�8�"�M�6�	3�	3�	3�	3�	3rc�<�|�||j��dSr)r�r��rr�s  r�run_testzTraceTestCase.run_testls �����T�4�;�/�/�/�/�/rc���|���}||j��tjd��|�|jj|j|j��dSr)r�r�rqrrr�r�r�r�)rr�r�s   r�	run_test2zTraceTestCase.run_test2osg���!�!�#�#����V�\������T�������D�M�8�"�M�4�;�	8�	8�	8�	8�	8rc�.�tjd��dSr�rqrrrs r�test_set_and_retrieve_nonez(TraceTestCase.test_set_and_retrieve_nonevs����T�����rc��d�}tj|��	tjd��dS#tjd��wxYw)Nc��dSrr"��argss r�fnz4TraceTestCase.test_set_and_retrieve_func.<locals>.fn{s���Drr�)rr�s  r�test_set_and_retrieve_funcz(TraceTestCase.test_set_and_retrieve_funczsV��	�	�	�	��R����	�
�L��������C�L��������s�Ac�:�|�t��dSr)r�r1rs r�
test_01_basiczTraceTestCase.test_01_basic�s���
�
�e�����rc�:�|�t��dSr)r�r:rs r�test_02_arigo0zTraceTestCase.test_02_arigo0�����
�
�n�%�%�%�%�%rc�:�|�t��dSr)r�rDrs r�test_02_arigo1zTraceTestCase.test_02_arigo1�r�rc�:�|�t��dSr)r�rFrs r�test_02_arigo2zTraceTestCase.test_02_arigo2�r�rc�:�|�t��dSr)r�rMrs r�test_03_one_instrzTraceTestCase.test_03_one_instr�r�rc�:�|�t��dSr)r�r\rs r�test_04_no_pop_blocksz#TraceTestCase.test_04_no_pop_blocks�s���
�
�m�$�$�$�$�$rc�:�|�t��dSr)r�rUrs r�test_05_no_pop_topsz!TraceTestCase.test_05_no_pop_tops�s���
�
�k�"�"�"�"�"rc�:�|�t��dSr)r�r3rs r�test_06_callzTraceTestCase.test_06_call�s���
�
�d�����rc�:�|�t��dSr)r�rlrs r�
test_07_raisezTraceTestCase.test_07_raise�s���
�
�j�!�!�!�!�!rc�:�|�t��dSr)r�rzrs r�test_08_settrace_and_returnz)TraceTestCase.test_08_settrace_and_return�s�����*�+�+�+�+�+rc�:�|�t��dSr)r�rrs r�test_09_settrace_and_raisez(TraceTestCase.test_09_settrace_and_raise�s�����)�*�*�*�*�*rc�:�|�t��dSr)r�r�rs r�test_10_ireturnzTraceTestCase.test_10_ireturn�s���
�
�o�&�&�&�&�&rc�:�|�t��dSr)r�r�rs r�test_11_tightloopzTraceTestCase.test_11_tightloop�s���
�
�'�(�(�(�(�(rc�:�|�t��dSr)r�r�rs r�test_12_tighterloopz!TraceTestCase.test_12_tighterloop�s���
�
�)�*�*�*�*�*rc�B�|�t��|���}tj|j��t��tjd��|�tjj|j	tj	��dSr)
r�r�r�rqrrr�r�r�r�r�)rr�s  r�test_13_genexpzTraceTestCase.test_13_genexp�s����
�
�'�(�(�(�
�!�!�#�#����V�+�,�,�,�������T�������-�6�E�"�M�+<�+C�	E�	E�	E�	E�	Erc�<�d�}|�|gd���dS)Nc�
�d}dS)NTFrr"r9s r�onlinersz2TraceTestCase.test_14_onliner_if.<locals>.onliners�s���Q��1r)r2r4r>rO�r�)rrs  r�test_14_onliner_ifz TraceTestCase.test_14_onliner_if�sG��	�	�	�	
����
�
�
�	�	�	�	�	rc�r�d�}|�|gd���d�}|�|gd���dS)Nc�*�td��D]}�dS�Nr=rRr9s r�for_examplez0TraceTestCase.test_15_loops.<locals>.for_example�s$���1�X�X�
�
���
�
r)r2r4r<r4r<r4r6c�0�d}|dkr
|dz}|dk�dSdS)Nr=rr0r"r9s r�
while_examplez2TraceTestCase.test_15_loops.<locals>.while_example�s>���A��a�%�
��Q����a�%�
�
�
�
�
r)r2r<r>rGr>rGr>rOr)rrrs   r�
test_15_loopszTraceTestCase.test_15_loops�s���	�	�	�	
����
�
�
�	�	�	�	�	�	�
	
����
�
�
�		�		�		�		�		rc�f�i}td|��|�|dgd���dS)Nadef f():
































































































































































































































































    pass�f)r2)�r5)rr7��execr�)r�	namespaces  r�test_16_blank_linesz!TraceTestCase.test_16_blank_lines�sP���	��
3�Y�?�?�?�����c�N�
�
�
�	�	�	�	�	rc�<�d�}|�|ddg��dS)Nc�:�dtj��_d}dSr)rqrsru)�linenos rr�z0TraceTestCase.test_17_none_f_trace.<locals>.func�s��&*�C�M�O�O�#��F�F�Frr2r4rr�s  r�test_17_none_f_tracez"TraceTestCase.test_17_none_f_trace�sB��	�	�	�	
���T�
�
�
�	�	�	�	�	rc�<�d�}|�|gd���dS)Nc�\�		t�#t$r}�d}~wwxYw#t$rYdSwxYwrrh)r�r,r[s   rr�z4TraceTestCase.test_18_except_with_name.<locals>.func�sW��
�$�#�O�� �$�$�$������$������
�
�
����
���s�
�
����
+�+)
r2r4r<r>�r?rnrGr@��r5)�	r5)r(r7rr�s  r�test_18_except_with_namez&TraceTestCase.test_18_except_with_name�sF��		�		�		�	
���T�	
�	
�	
�
	�
	�
	�
	�
	rc�<�d�}|�|gd���dS)Nc�H�		t�#d}wxYw#t$rd}YdSwxYw)N�	Something�rh)r[r�s  rr�z7TraceTestCase.test_19_except_with_finally.<locals>.funcsE��
�$�#�O��#�A�O�O�O�O���
�
�
������
���s�
���!�!)	r2r4r<r>r%r@rVrIrKrr�s  r�test_19_except_with_finallyz)TraceTestCase.test_19_except_with_finallysF��	�	�	�	
���T�
�
�
�		�		�		�		�		rc����Gd�d����fd���fd�}|���}gd�}	||j��n#t$rYnwxYw|��jj|j|��dS)Nc� �eZdZd�Zd�Zd�ZdS)�BTraceTestCase.test_20_async_for_loop.<locals>.AsyncIteratorWrapperc�.�t|��|_dSr)�iter�_it)r�objs  rrzKTraceTestCase.test_20_async_for_loop.<locals>.AsyncIteratorWrapper.__init__s����9�9����rc��|Srr"rs r�	__aiter__zLTraceTestCase.test_20_async_for_loop.<locals>.AsyncIteratorWrapper.__aiter__����rc��ZK�	t|j��S#t$rt�wxYwr)�nextr4�
StopIteration�StopAsyncIterationrs r�	__anext__zLTraceTestCase.test_20_async_for_loop.<locals>.AsyncIteratorWrapper.__anext__!s:����-����>�>�)��$�-�-�-�,�,�-���s��*N)rr r!rr7r=r"rr�AsyncIteratorWrapperr1sA������
%�
%�
%�
�
�
�
-�
-�
-�
-�
-rr>c��<�K��d��23d{V��}|}�
6d}dS)N�abc�*r")�letterr,r[r>s   �r�
doit_asyncz8TraceTestCase.test_20_async_for_loop.<locals>.doit_async'sO����� 4� 4�U� ;� ;�
�
�
�
�
�
�
�f����!<��A�A�As�c�������}	tj|��|�d��tjd��dS#tjd��wxYwr)rqrr�send)r�r,rCs  �r�runz1TraceTestCase.test_20_async_for_loop.<locals>.run,s^����
���A�
#���V�$�$�$����t������T�"�"�"�"�"����T�"�"�"�"���s�)A�A")(r2r4)i�r3)���r5)rGr7�i����r3����r5�rJr7r�r�r�r��r0rnr<r4r�r�r�r�rLr<r4r�r�r�r�rLr<r4r�r�r�r��rcr5rdrmrfrLr>rO)r�r�rir�r�r�r�)rrFr�r�r>rCs    @@r�test_20_async_for_loopz$TraceTestCase.test_20_async_for_loops�����	-�	-�	-�	-�	-�	-�	-�	-�	�	�	�	�	�
	#�	#�	#�	#�	#��!�!�#�#��(�(�(��R	��C���������	�	�	��D�	�������J�/�>�"�M�6�	3�	3�	3�	3�	3s�A�
A�Ac���d���fd�}|���}|��}	tj|j��|�d��n#t
$rYnwxYwtjd��n#tjd��wxYwgd�}|�|jj|j	|��dS)Nc�8K�t|��D]}|WV��dSrrR)�nr�s  r�arangezGTraceTestCase.test_async_for_backwards_jump_has_no_line.<locals>.arangefs2�����1�X�X�
�
��������
�
rc��F�K��d��23d{V��}|dkrdS�6dS)Nr?�dr")r�rRs �rrzBTraceTestCase.test_async_for_backwards_jump_has_no_line.<locals>.fisX�����!�6�!�9�9�
�
�
�
�
�
�
�a��s�7���E�E��%�9�9s� )r2r4rbrdr�r�rLr<r4�r�r3rdr�r�rLr<r4rUrdr�r�rLr<r4rUrdrfrLr6)
r�rqrrr�rErir�r�r�r�)rrr��coror�rRs     @r�)test_async_for_backwards_jump_has_no_linez7TraceTestCase.test_async_for_backwards_jump_has_no_linees����	�	�	�	�	�	�	�	�
�!�!�#�#���q�s�s��	��L���&�&�&��I�I�d�O�O�O�O���	�	�	��D�	����
�L�������C�L���������
�
�
��<	
���A�J�5�"�M�6�	3�	3�	3�	3�	3s)�.A�A=�
A%�"A=�$A%�%A=�=Bc�<�d�}|�|gd���dS)Nc��	dSrr"r"rrr�z1TraceTestCase.test_21_repeated_pass.<locals>.func�s
����Dr�r2r4r<rXrr�s  r�test_21_repeated_passz#TraceTestCase.test_21_repeated_pass�sF��	�	�	�	
���T�
�
�
�	�	�	�	�	rc�<�d�}|�|gd���dS)Nc�"�	dD]}�dS#YdSxYw)Nr"r0r=r"�r�s rr�z3TraceTestCase.test_loop_in_try_except.<locals>.func�s)��
��!�!�A�A��q��
��q�q���s�	�rNrr�s  r�test_loop_in_try_exceptz%TraceTestCase.test_loop_in_try_except�sF��	�	�	�	
���T�
�
�
�	�	�	�	�	rc�B���fd��|��gd���dS)Nc�D��					�jdkr	n#YnxYwdS#wxYw�NF�Fred)r�r�s�rr�z8TraceTestCase.test_try_except_no_exception.<locals>.func�sK���

������=�F�*�����
������������s�����	r2r4r<rVrI�r�r5��r5��r5�rjr7rr�s @r�test_try_except_no_exceptionz*TraceTestCase.test_try_except_no_exception��Q���	�	�	�	�	� 	
���T�
�
�
�		�		�		�		�		rc�<�d�}|�|gd���dS)Nc�R�				t�#YnxYw	n#wxYwn#YnxYwdS#wxYwrrhr"rrr�z6TraceTestCase.test_try_exception_in_else.<locals>.func�sU��

����#�O��	��A����A�
��B�B�B�B�B��
������������s(�������$��$�&)r2r4r<r>rIr&)r'rnrfrg��r5rirkrr�s  r�test_try_exception_in_elsez(TraceTestCase.test_try_exception_in_else�sF��	�	�	� 	
���T�
�
�
�	�	�	�	�	rc�<�d�}|�|gd���dS)Nc�`�td��D]}td��D]}||z}��|dkS)Nr=r0rR)r��jrTs   rr�z-TraceTestCase.test_nested_loops.<locals>.func�sE���1�X�X�
�
���q�����A��A��A�A����6�Mr)r2r4r<r>r<r>r<r4r<r>r<r>r<r4rGr^rr�s  r�test_nested_loopszTraceTestCase.test_nested_loops�sF��	�	�	�	
���T�
�
�
�	�	�	�	�	rc�<�d�}|�|gd���dS)Nc�H�ddg}|r|���}|rn|�d}|S)Nr0r�c��pop)�seqrQs  rr�z)TraceTestCase.test_if_break.<locals>.funcsA���a�&�C��
��G�G�I�I������
�
���Hr)r2r4r<r>rGr<r>rGr@r&�r'r7rr�s  r�
test_if_breakzTraceTestCase.test_if_breaksF��	�	�	�	
���T�

�

�

�	�	�	�	�	rc�<�d�}|�|gd���dS)Nc��d\}}}}	td��D]}	d}|dkr	d}dSd}d}�#d}wxYwdS#d}YdSxYw)N)r0r0r0ryr?rArr�r'rqrR)rT�c�dr�s    rr�z6TraceTestCase.test_break_through_finally.<locals>.func's���$�J�A�q�!�Q�

��q�����A�����q�5�"�!������������B���������
��������s �7�.�7�.�7�2�7�>)r2r4r<r>rGr@rVr&rfr>rGr@rVrIrf��
r5�r�r7rr�s  r�test_break_through_finallyz(TraceTestCase.test_break_through_finally%sF��
	1�
	1�
	1�	
���T�
�
�
�	�	�	�	�	rc�<�d�}|�|gd���dS)Nc��d\}}}}}	td��D]}	d}|dkr	d}�d}d}�#d}wxYwdS#d}YdSxYw)N)r0r0r0r0ryr=rArr�r'rqrR)rTr�r�r�r�s     rr�z9TraceTestCase.test_continue_through_finally.<locals>.funcKs���*�M�A�q�!�Q��

��q�����A�����q�5�%�$����������B���������
��������s �6�-�6�-�6�1�6�=)r2r4r<r>rGr@rVr&rfr>rGr@rVrIrfr>r�r�rr�s  r�test_continue_through_finallyz+TraceTestCase.test_continue_through_finallyIsF��
	1�
	1�
	1�	
���T�
�
�
�	�	�	�	�	rc�<�d�}|�|gd���dS)Nc��		dS#wxYwrr"r"rrr�z7TraceTestCase.test_return_through_finally.<locals>.funcps��
��������s�r]rr�s  r�test_return_through_finallyz)TraceTestCase.test_return_through_finallynsF��	�	�	�	
���T�
�
�
�	�	�	�	�	rc�<�d�}|�|gd���dS)Nc�D�	ddzn#t$rYnwxYwdS#YdSxYw)Nr=rrW)r�r"rrr�z;TraceTestCase.test_try_except_with_wrong_type.<locals>.funcsH��
��!������
�
�
���
�����q��q�q�q�q�q�q�qs���
����)r2r4r<ror>rVr�rr�s  r�test_try_except_with_wrong_typez-TraceTestCase.test_try_except_with_wrong_type}sF��	�	�	�	
���T�
�
�
�	�	�	�	�	rc�<�d�}|�|gd���dS)Nc�D�d}dg}|r|���|r	�dSr/rz��TRUEr,s  rr�z3TraceTestCase.test_break_to_continue1.<locals>.func�s;���D���A��
�����������	
�
r)
r2r4r<r>rGr@rVrIr>rOrr�s  r�test_break_to_continue1z%TraceTestCase.test_break_to_continue1�sF��	�	�	�	
���T�	
�	
�	
�
	�
	�
	�
	�
	rc�<�d�}|�|gd���dS)Nc�L�d}dg}|r|���|rn�|�dSdSr/rzr�s  rr�z3TraceTestCase.test_break_to_continue2.<locals>.func�sO���D���A��
������������
�
�
�
�
r)	r2r4r<r>rGr@rVr>rOrr�s  r�test_break_to_continue2z%TraceTestCase.test_break_to_continue2�sF��	�	�	�	
���T�
�
�
�		�		�		�		�		rc�<�d�}|�|gd���dS)Nc��d}|r|r	dSdSr/r")r�s rr�z/TraceTestCase.test_break_to_break.<locals>.func�s)���D��
������
�
r)r2r4r<r>rGr@rBrr�s  r�test_break_to_breakz!TraceTestCase.test_break_to_break�sF��	�	�	�	
���T�
�
�
�	�	�	�	�	rc�<�d�}|�|gd���dS)Nc�:�dx}}|dkr|dkrd}dSd}dSd}dS)Nr0rHrWr'r")rTr�r,r[�zs     rr�z+TraceTestCase.test_nested_ifs.<locals>.func�s>���I�A���A�v�
���6���A�A�A��A�A�A����rr�rr�s  r�test_nested_ifszTraceTestCase.test_nested_ifs�sF��	�	�	�	
���T�
�
�
�	�	�	�	�	rc�V�������fd�}dx��d�|�|gd���dS)Nc�V���r�r�r	trdSdSdSdStr	trdSdSdS)NFT)�D�E�F)�A�B�Cs���rr�z4TraceTestCase.test_nested_ifs_with_and.<locals>.func�sk����
��!��)��)�#(�5�)�)�)�)�!�5��
�q�
��t�
�
�
�
rTFrNr)rr�r�r�r�s  @@@r�test_nested_ifs_with_andz&TraceTestCase.test_nested_ifs_with_and�sk�����		�		�		�		�		�		�		����A������T�
�
�
�	�	�	�	�	rc�<�d�}|�|gd���dS)Nc�d�d}	ddzn$#t$r|dkrt���YnwxYwd}dS)N�hellor?r�raiserJ)�ZeroDivisionError�
ValueError)r,rs  rr�z.TraceTestCase.test_nested_try_if.<locals>.func�s]���A�
'��!�����$�
'�
'�
'���<�'�$�,�,�&�'�'�
'�����A�A�As�
�+�+�	r2r4r<r>r%rGr@rIrKrr�s  r�test_nested_try_ifz TraceTestCase.test_nested_try_if��F��	�	�	�	
���T�
�
�
�		�		�		�		�		rc�\��Gd�d����fd�}|�|gd���dS)Nc��eZdZd�Zd�ZdS)�.TraceTestCase.test_if_false_in_with.<locals>.Cc��|Srr"rs rrz8TraceTestCase.test_if_false_in_with.<locals>.C.__enter__r8rc��dSrr"r�s rrz7TraceTestCase.test_if_false_in_with.<locals>.C.__exit__����rN�rr r!rrr"rrr�r��2������
�
�
�
�
�
�
�
rr�c�P�����5	ddd��dS#1swxYwYdSrr"�r�s�rr�z1TraceTestCase.test_if_false_in_with.<locals>.funcsx�������
�
��
�
�
�
�
�
�
�
�
�
�
�
����
�
�
�
�
�
s���)r2r4�r�r3r�r�r<r4rbrdrfr6r)rr�r�s  @r�test_if_false_in_withz#TraceTestCase.test_if_false_in_withsy���	�	�	�	�	�	�	�	�	�	�	�	�	�
	
���T�

�

�

�	�	�	�	�	rc�<�d�}|�|gd���dS)Nc�8�	dS#t$rtYdSwxYwr)ri�Xr"rrr�z7TraceTestCase.test_if_false_in_try_except.<locals>.func-s7��
�����
�
�
������
���s��rZrr�s  r�test_if_false_in_try_exceptz)TraceTestCase.test_if_false_in_try_except+sF��	�	�	�	
���T�
�
�
�	�	�	�	�	rc�<�d�}|�|gd���dS)Nc� �Gd�d��}dS)Nc�&�eZdZddkrdZdSdZdS)�DTraceTestCase.test_implicit_return_in_class.<locals>.func.<locals>.Ar?r(r0r=N)rr r!rTr"rrr�r�=s(�������q�5���A�A�A��A�A�Arr�r")r�s rr�z9TraceTestCase.test_implicit_return_in_class.<locals>.func<s4��
�
�
�
�
�
�
�
�
�
r�r2r4)r0r3r4r<r>rOr6rr�s  r�test_implicit_return_in_classz+TraceTestCase.test_implicit_return_in_class:sF��	�	�	�	
���T�
�
�
�	�	�	�	�	rc�<�d�}|�|gd���dS)Nc�\�		dS#t$r}Yd}~dSd}~wwxYw#t$rYdSwxYwrrh��exs rr�z+TraceTestCase.test_try_in_try.<locals>.funcNs_��
���D�� �����D�D�D�D�D�����������
�
�
����
���s�
����
+�+rNrr�s  r�test_try_in_tryzTraceTestCase.test_try_in_tryMsF��	�	�	�	
���T�
�
�
�	�	�	�	�	rc�r�d�}|�|gd���d�}|�|gd���dS)Nc�f�		t�#t$r}Yd}~dSd}~wwxYw#t$rYdSwxYwr)�	TypeErrorr�r�s rr�z:TraceTestCase.test_try_in_try_with_exception.<locals>.func`s_��
��#�O��!�����A�A�A�A�A�����������
�
�
����
�����
�
�"��"�
0�0�	r2r4r<r>r%rGrVrIrKc�f�		t�#t$r}Yd}~dSd}~wwxYw#t$rYdSwxYwr�r�r�r�s rr�z:TraceTestCase.test_try_in_try_with_exception.<locals>.functs`��
��$�$��!�����A�A�A�A�A�����������
�
�
����
���r�)r2r4r<r>r%rGr@rBrr�s  r�test_try_in_try_with_exceptionz,TraceTestCase.test_try_in_try_with_exception^s���	�	�	�	
���T�
�
�
�		�		�		�	�	�	�	
���T�
�
�
�	�	�	�	�	rc�>�dd�}|�|gd���dS)Nrr0c��|r
|r|rdSdSdSdSrr")rT�pr�s   rr�z/TraceTestCase.test_if_in_if_in_if.<locals>.func�s5���
���������	���rrZ)rr0r0rr�s  r�test_if_in_if_in_ifz!TraceTestCase.test_if_in_if_in_if�sK��	�	�	�	�	
���T�
�
�
�	�	�	�	�	rc���Gd�d����fd�}�fd�}|�|gd���|�|gd���dS)Nc��eZdZd�Zd�ZdS)�-TraceTestCase.test_early_exit_with.<locals>.Cc��|Srr"rs rrz7TraceTestCase.test_early_exit_with.<locals>.C.__enter__�r8rc��dSrr"r�s rrz6TraceTestCase.test_early_exit_with.<locals>.C.__exit__�r�rNr�r"rrr�r��r�rr�c�Z��dD]&}���5	ddd��n#1swxYwY�'dS)N�r0r=r")r�r�s �r�
func_breakz6TraceTestCase.test_early_exit_with.<locals>.func_break�s�����
�
���Q�S�S�������������������������Ds��#	�#	c�P�����5	ddd��dS#1swxYwYdSrr"r�s�r�func_returnz7TraceTestCase.test_early_exit_with.<locals>.func_return�sv�������
�
��
�
�
�
�
�
�
�
�
�
�
�
����
�
�
�
�
�
s���)
r2r4r<r�r�r�r>r<rbrdrfrGr^)r2r4)rGr3)���r5)r�r7r<r4rHrIrKr6r)rr�r�r�s   @r�test_early_exit_withz"TraceTestCase.test_early_exit_with�s����	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	
���Z�
�
�
�
	�
	�
	�	
���[�

�

�

�	�	�	�	�	rc�H��d���fd�}|�|gd���dS)Nc�>�|r	d|dz
zn#t$rYnwxYw|Sr/�r�r9s r�fooz;TraceTestCase.test_flow_converges_on_same_line.<locals>.foo�sC���
���q�1�u�I�I�I��(�����D������Hs�
�
�c�B��td��D]
}�|���dSrrR)r�r�s �rr�z<TraceTestCase.test_flow_converges_on_same_line.<locals>.func�s1����1�X�X�
�
����A�����
�
r)r2r4r<�rJr3�i����r5rdrfr4r<r�r�)r�r5r�)r�rnr�rMrdrfr4r6r)rr�r�s  @r� test_flow_converges_on_same_linez.TraceTestCase.test_flow_converges_on_same_line�s`���	�	�	�	�	�	�	�	�	
���T�
�
�
�	�	�	�	�	rc�<�d�}|�|gd���dS)Nc�L�d}	d|zn#t$r
}|r�Yd}~nd}~wwxYwdS)Nrr0�doner�)r,�errors  rr�zCTraceTestCase.test_no_tracing_of_named_except_cleanup.<locals>.func�sa���A�
��!�����$�
�
�
�������������
�����6s�
�
!��!r�rr�s  r�'test_no_tracing_of_named_except_cleanupz5TraceTestCase.test_no_tracing_of_named_except_cleanup�sF��	�	�	�	
���T�	�	�	�		�		�		�		�		rc�\��Gd�d����fd�}|�|gd���dS)Nc��eZdZd�Zd�ZdS)�DTraceTestCase.test_tracing_exception_raised_in_with.<locals>.NullCtxc��|Srr"rs rrzNTraceTestCase.test_tracing_exception_raised_in_with.<locals>.NullCtx.__enter__r8rc��dSrr")r�excinfos  rrzMTraceTestCase.test_tracing_exception_raised_in_with.<locals>.NullCtx.__exit__r�rNr�r"rr�NullCtxr�r�rr�c�|��	���5ddzddd��dS#1swxYwYdS#t$rYdSwxYw�Nr0rr�)r�s�rr�zATraceTestCase.test_tracing_exception_raised_in_with.<locals>.funcs����
��W�Y�Y����a�C�C�����������������������$�
�
�
����
���s$�
-� �-�$�-�$�-�
;�;)r2r4r<r�r�r�r>r%r<rbrdrfrGr@rBr)rr�r�s  @r�%test_tracing_exception_raised_in_withz3TraceTestCase.test_tracing_exception_raised_in_withsy���	�	�	�	�	�	�	�	�	�	�	�	�	�	
���T�
�
�
�	�	�	�	�	rc�B���fd��|��gd���dS)Nc�t��	n #xgct%x�nn��Xx�YncYwxYw			�jdkr	dS#wxYwrb)rirrds�rr�z=TraceTestCase.test_try_except_star_no_exception.<locals>.func"sz���

���
�
�
�I�
�
�
�
�
�
���������������������=�F�*���������s�5�!�5�7rerr�s @r�!test_try_except_star_no_exceptionz/TraceTestCase.test_try_except_star_no_exception rmrc�<�d�}|�|gd���dS)Nc�b�	n&#xgct%x�n
}d}~nd}~��Xx�YncYwxYw	dS#wxYwrrh�r�s rr�zCTraceTestCase.test_try_except_star_named_no_exception.<locals>.func?sf��
���
�
�
�I�
�
�
�
�
�
������������������������������s�,�&�	,�.)r2r4r<rVr&r}rr�s  r�'test_try_except_star_named_no_exceptionz5TraceTestCase.test_try_except_star_named_no_exception=sF��	�	�	�	
���T�
�
�
�	�	�	�	�	rc�<�d�}|�|gd���dS)Nc�p�	td���#xgct%x�nn��Xx�YncYwxYwdS#wxYwr�r�r"rrr�zATraceTestCase.test_try_except_star_exception_caught.<locals>.funcSse��
� ��m�m�#��
�
�
�J�
�
�
�
�
�
�����������������������s��.�3�5�r2r4r<ror>rGr&r}rr�s  r�%test_try_except_star_exception_caughtz3TraceTestCase.test_try_except_star_exception_caughtQ�F��	�	�	�	
���T�
�
�
�	�	�	�	�	rc�<�d�}|�|gd���dS)Nc�|�	td���#xgct%x�n
}d}~nd}~��Xx�YncYwxYwdS#wxYwrrrs rr�zGTraceTestCase.test_try_except_star_named_exception_caught.<locals>.funcisn��
� ��m�m�#��
�
�
�J�
�
�
�
�
�
�����������������������������s��4�9�;rrr�s  r�+test_try_except_star_named_exception_caughtz9TraceTestCase.test_try_except_star_named_exception_caughtgrrc�<�d�}|�|gd���dS)Nc��		td���#xgct%x�nn��Xx�YdScYwxYw#t$rYdSwxYw�Nr?r�r"rrr�zETraceTestCase.test_try_except_star_exception_not_caught.<locals>.funcs���
��$�Q�-�-�'�����	��������������������������
�
�
����
���s��0�3�3�
A�Ar�rr�s  r�)test_try_except_star_exception_not_caughtz7TraceTestCase.test_try_except_star_exception_not_caught}r�rc�<�d�}|�|gd���dS)Nc��		td���#xgct%x�n
}d}~nd}~��Xx�YdScYwxYw#t$rYdSwxYwr
r�rs rr�zKTraceTestCase.test_try_except_star_named_exception_not_caught.<locals>.func�s���
��$�Q�-�-�'�����	��������A�A�A����������������������
�
�
����
���s��6�9�9�
A�Ar�rr�s  r�/test_try_except_star_named_exception_not_caughtz=TraceTestCase.test_try_except_star_named_exception_not_caught�r�rc�<�d�}|�|gd���dS)Nc��		tdtd��td��g���#xgct%x�n
}d}~nd}~�t%x�nn�t%x�n���Xx�YncYwxYwne#xgct%x�nI	td���#xgct%x�nn�t%x�n
}d}~nd}~��Xx�YncYwxYwn��Xx�YncYwxYwdS)N�egrAzbad typerjr)�ExceptionGroupr�r��OSErrorrs rr�z7TraceTestCase.test_try_except_star_nested.<locals>.func�s���
�	�(��#�A���	�*�(=�(=�>�@�@�@�����	��������A�A�A����������������"�������������������������
�
�
�J�
�
�
�
�
�
��#�B�-�-�'���������������!��������B�B�B������������������������������������1s9�,/�4A0�#A$	�$A0�+A4�4C�B�-C�C
	�	C)r2r4r<r>rGr@r>r%rVrIr&rfrgrpr�ri)rjrn)�r5)�r5)�r5)�r5)rr7rr�s  r�test_try_except_star_nestedz)TraceTestCase.test_try_except_star_nested�sF��	�	�	�*	
���T�
�
�
�	�	�	�	�	rc�<�d�}|�|gd���dS)Nc��	d�dS)Nc��dSrr"r9s r�<lambda>zATraceTestCase.test_notrace_lambda.<locals>.func.<locals>.<lambda>�s��a�rr"r"rrr�z/TraceTestCase.test_notrace_lambda.<locals>.func�s��
��K�K�
�ArrNrr�s  r�test_notrace_lambdaz!TraceTestCase.test_notrace_lambda�sF��	�	�	�
	
���T�
�
�
�	�	�	�	�	rc�<�d�}|�|gd���dS)Nc� �Gd�d��}dS)Nc��eZdZ	d�ZdS)�PTraceTestCase.test_class_creation_with_docstrings.<locals>.func.<locals>.Class_1c��	d|_dS�NrA)rTrs rrzYTraceTestCase.test_class_creation_with_docstrings.<locals>.func.<locals>.Class_1.__init__�s��/��D�F�F�FrN)rr r!rr"rr�Class_1r$�s&������'�����rr'r")r's rr�z?TraceTestCase.test_class_creation_with_docstrings.<locals>.func�s4��
�
�
�
�
�
�
�
�
�
rr�rr�s  r�#test_class_creation_with_docstringsz1TraceTestCase.test_class_creation_with_docstrings�sF��	�	�	�	
���T�
�
�
�	�	�	�	�	rc�@���tjd��}d���fd�}gd�}g}|�|��|��tjd��|jj��fd�|D��}|�||��|�||��dS)N�	_testcapic3�K�dV�dSr/r"r"rr�genzFTraceTestCase.test_no_line_event_after_creating_generator.<locals>.gens�����G�G�G�G�Grc�"�����D]}�dSrr")�_r,s �rr�zGTraceTestCase.test_no_line_event_after_creating_generator.<locals>.funcs'�������
�
���
�
r)r2r<r4rbrdrfrGr4)rer3rfr6c�<��g|]\}}}|�z
t|f��Sr")�EVENT_NAMES)r��whatr5r��
start_lines    �rr�zMTraceTestCase.test_no_line_event_after_creating_generator.<locals>.<listcomp>s=���
�
�
�!��t�S��*�_�k�$�/�0�
�
�
r)	r�
import_module�settrace_to_recordrqrrr�r��assertEqualr�)rr*r��EXPECTED_EVENTSr�r,r2s     @@r�+test_no_line_event_after_creating_generatorz9TraceTestCase.test_no_line_event_after_creating_generator�s�����
"�/��<�<�	�	�	�	�	�	�	�	�	�
�
�
�� ���$�$�V�,�,�,�d�d�f�f�f�c�l�4�6H�6H�6H��]�1�
�
�
�
�
�%+�
�
�
��	
�����1�1�1����T�?�3�3�3�3�3rc�|�i}tdddz�d�|��|d}gd�}|�||��dS)Nz�def f():              # line 0
            x = 0                     # line 1
            y = 1                     # line 2
            r�izn                        # lines 3 through (1 << 16)
            x += 1                    #
            returnr)r2r4r<)ir5)�r5)r9r7r)rr�rr6s    r�test_very_large_functionz&TraceTestCase.test_very_large_function&so������
��)�)�)�,�
./�	0�	0�	0�
�c�F��
�
�
��	
���Q��0�0�0�0�0rN)Krr r!r�r��staticmethodr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrr	rrrrr"r)r.rNrWr[r_rlrrrvr~r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrr
rrrr r(r�cpython_onlyr7r:r"rrr�r�JsO������6�6�6�
�������\��D�D�D�3�3�3�0�0�0�8�8�8�&�&�&�������&�&�&�&�&�&�&�&�&�&�&�&�%�%�%�#�#�#����"�"�"�,�,�,�+�+�+�'�'�'�)�)�)�+�+�+�E�E�E�
�
�
����>���������0���*J3�J3�J3�X23�23�23�h	�	�	����"���:���@���4���2"�"�"�H#�#�#�J
�
�
����&���.���.���$���(���.���,���4
�
�
����&���"'�'�'�R���",�,�,�\"�"�"�H���,���@���:���(���,���,���,���,-�-�-�^
�
�
����&
��)4�)4���)4�V1�1�1�1�1rr�)r3rnr5r7c�6��eZdZ	�fd�Zed���Z�xZS)�SkipLineEventsTraceTestCasec�f��d�|D��}t���|||��dS)Nc�*�g|]}|ddk�|��Sr4r"�r�r�s  rr�z>SkipLineEventsTraceTestCase.compare_events.<locals>.<listcomp>Is%��I�I�I�!�!�A�$�&�.�I�A�I�I�Ir)�superr�)rr�r�r��skip_line_events�	__class__s     �rr�z*SkipLineEventsTraceTestCase.compare_eventsHs:���I�I��I�I�I��
�����{�F�4D�E�E�E�E�Erc�"�td���S)NF)r�r�r"rrr�z'SkipLineEventsTraceTestCase.make_tracerLs����.�.�.�.r�rr r!r�r;r��
__classcell__�rDs@rr>r>Es[�������B�F�F�F�F�F��/�/��\�/�/�/�/�/rr>c�6��eZdZ	�fd�Zed���Z�xZS)�TraceOpcodesTestCasec����d�|D��}t|��dkr2|�t|��t|��d���t���|||��dS)Nc�*�g|]}|ddk�|��S)r0�opcoder"rAs  rr�z7TraceOpcodesTestCase.compare_events.<locals>.<listcomp>Vs&��D�D�D�A�1�Q�4�8�3C�D�a�D�D�Drr0z)No 'opcode' events received by the tracer)�msg)�len�
assertLessrBr�)rr�r�r��skip_opcode_eventsrDs     �rr�z#TraceOpcodesTestCase.compare_eventsUs����D�D��D�D�D���v�;�;��?�	M��O�O�C� 2�3�3�S��[�[� K�
�
M�
M�
M�
�����{�,>��P�P�P�P�Prc�"�td���S)NT)r�r�r"rrr�z TraceOpcodesTestCase.make_tracer\s���$�/�/�/�/rrFrHs@rrJrJQs[�������E�Q�Q�Q�Q�Q��0�0��\�0�0�0�0�0rrJc�J�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�ZdS)�RaisingTraceFuncTestCasec�h�|�tjtj����dSr�r�rqrrr�rs rr�zRaisingTraceFuncTestCase.setUpbs$�������c�l�n�n�5�5�5�5�5rc�6�	||jkrt�|jSr)�raiseOnEventr�r�r�s    rr�zRaisingTraceFuncTestCase.tracees%��	!��D�%�%�	����:�rc�0�	|jdkr	d}d|z}dSdS)Nrnrr0)rX)rr,r[s   rrzRaisingTraceFuncTestCase.fms/��	E����+�	��A��!��A�A�A��1rc�V�	||_	ttj��dz��D]U}tj|j��	|���|�d���F#t$rY�RwxYwdS#t$r|�d��YdSwxYw)Nr0zexception not raised!zrecursion counter not reset)
rXrSrq�getrecursionlimitrrr�rr�r�r|)rr�r�s   r�run_test_for_eventz+RaisingTraceFuncTestCase.run_test_for_eventvs���	�!���
	5��3�0�2�2�Q�6�7�7�
7�
7����T�Z�(�(�(�7��F�F�H�H�H��I�I�5�6�6�6�6��"�����D�����	
7�
7���	5�	5�	5��I�I�3�4�4�4�4�4�4�	5���s5�>B�	A3�B�3
B�=B�?B�B�B(�'B(c�0�|�d��dS)Nr3�r\rs r�	test_callz"RaisingTraceFuncTestCase.test_call��������'�'�'�'�'rc�0�|�d��dS�Nr5r^rs r�	test_linez"RaisingTraceFuncTestCase.test_line�r`rc�0�|�d��dS)Nr7r^rs r�test_returnz$RaisingTraceFuncTestCase.test_return�s������)�)�)�)�)rc�0�|�d��dS�Nrnr^rs r�test_exceptionz'RaisingTraceFuncTestCase.test_exception�s������,�,�,�,�,rc�����d����fd��tj���	���|�d��dS#t$rddl}|j��YdSwxYw)Nc�H�td��D]}t|���dSr&)rS�printr^s rrz4RaisingTraceFuncTestCase.test_trash_stack.<locals>.f�s.���1�X�X�
�
���a�����
�
rc�b��|dkr'|j�jjdzkrtd����S)Nr5r=z
i am crashing)r�r�r�r|)r��why�extrar�gs   ��rroz4RaisingTraceFuncTestCase.test_trash_stack.<locals>.g�s;����v�
�
4���!�*�";�a�"?�?�
4�"�?�3�3�3��Hrzexception not propagatedr)rqrrr�r|r��collect)rr�rros  @@r�test_trash_stackz)RaisingTraceFuncTestCase.test_trash_stack�s�����	�	�	�	�	�	�	�	�	�	��Q����	2�
�A�C�C�C�
�I�I�0�1�1�1�1�1���	�	�	��I�I�I��B�J�L�L�L�L�L�L�	���s�
A�A#�"A#c����d�}��fd��tj��}	tj���	|��n#t$rYnwxYwtj|��dS#tj|��wxYw)Nc��d}|jdS)Nr)�no_such_attrr9s rrz<RaisingTraceFuncTestCase.test_exception_arguments.<locals>.f�s���A�
�N�N�N�Nrc�V��|dkr!|\}}}��|t���Srg)�assertIsInstanceri)r�r�r��typernr�rors      ��rroz<RaisingTraceFuncTestCase.test_exception_arguments.<locals>.g�s7�����$�
<�),�&��i���%�%�i��;�;�;��Hr)rqr�rr�AttributeError)rr�existingros`  @r�test_exception_argumentsz1RaisingTraceFuncTestCase.test_exception_arguments�s�����	�	�	�	�	�	�	�	�	��<�>�>��	#��L��O�O�O�
��������!�
�
�
���
����
�L��"�"�"�"�"��C�L��"�"�"�"���s-�A&�
A�A&�
A
�
A&�A
�
A&�&A<N)
rr r!r�r�rr\r_rcrerhrqrzr"rrrTrTas�������6�6�6�������5�5�5�"(�(�(�(�(�(�*�*�*�-�-�-�2�2�2�,#�#�#�#�#rrTc�"�eZdZ			dd�Zd�ZdS)�
JumpTracerr5Fc��|j|_||_||_||_|rdn|jj|_d|_dS)NF)r��code�jumpFrom�jumpTor�r��	firstLiner�)r�functionrr�r��	decorateds      rrzJumpTracer.__init__�sA���%��	� ��
������
�!*�H����	�0H�����	�	�	rc��|jrdS|j�%|j|jkr|dkr|jdz
|_||jkr�|j��|j|j|jzkrh|}|�)|j|jkr|j}|�|j|jk�|�9	|j|jz|_n#t$r|j|_YnwxYwd|_|j
S)Nr5r0T)r�r��f_coder~r�r�rrtr�r�r�)rr�r�r�rs     rr�zJumpTracer.trace�s���9�	��F�

�N�	0�u�|�t�y�'@�	0����	0�"�^�a�/�D�N��T�Z��	!�D�N�	!���$�.�4�=�"@�@�	!��A��
�A�H��	�$9�
��H���
�A�H��	�$9�
��
!�1�%)�^�d�k�%A�E�N�N�� �1�1�1�%)�[�E�N�N�N�1���� ��	��z�s�B%�%B>�=B>N)r5F)rr r!rr�r"rrr|r|�s@������H�9?� ���������rr|c��	|�d��dS#t$r/}|�dt|��v��Yd}~dSd}~wwxYw)Nr=�integer)rr�r��rr�s  r�no_jump_to_non_integersr��sm��+��
�
�a��������+�+�+��
�
�i�3�q�6�6�)�*�*�*�*�*�*�*�*�*�����+���s��
A�$A
�
Ac��	tj��j}|j|_t	d���#t
$r}dt
|��vr�Yd}~dSd}~wwxYw)Nz'Trace-function-less jump failed to failr�)rqrsrtr��AssertionErrorr�r�)�previous_framer�s  r�no_jump_without_trace_functionr��s���
H�����/��"0�"9����F�G�G�G�������#�a�&�&� �	��	�	�	�	�	�	��������s�$5�
A�A�Ac���eZdZd�Zd�Z		d�d�Z		d�d�Zd�d�Zd�d	�Zed
ddg��d���Z	ed
d
gd���d���Z
eddd
dg��d���Zedd
gd���d���Zeddddg��d���Z
edd
gd���d���Zed
d
dg��d���Zed
d
gd���d���Zeddd
dg��d���Zeddd
dgedf��d ���Zedd!d
d!gedf��d"���Zedd!d
dged#f��d$���Zeddd
ged%f��d&���Zed
dddg��d'���Zeddgd(���d)���Zed
dd
dg��d*���Zed
dd
dg��d+���Zedd
gd,���d-���Zedd
gd,���d.���Zed
ddg��d/���Zedd
gd0���d1���Zed
ddg��d2���Z edd
gd3���d4���Z!eddgd5���d6���Z"eddgd5���d7���Z#eddgd8���d9���Z$edd
gd:���d;���Z%ed
dgd<���d=���Z&ed
dgd<���d>���Z'eddgd?���d@���Z(eddgd?���dA���Z)eddgdB���dC���Z*eddgdB���dD���Z+eddgdE���dF���Z,eddgdE���dG���Z-edHd!gdI���dJ���Z.eddgdK���dL���Z/eddgdK���dM���Z0eddgdN���dO���Z1eddHgdP���dQ���Z2ed
dddHg��dR���Z3ed
dddHg��dS���Z4ed
dd
ged%f��dT���Z5ed
dUd
gedVf��dW���Z6ed
ddgedXf��dY���Z7ed
ddgedXf��dZ���Z8ed
ddgedXf��d[���Z9ed
ddgedXf��d\���Z:ed
dged]f��d^���Z;ed
dged]f��d_���Z<edd
d
d
ged]f��d`���Z=edd
d
d
gedaf��db���Z>ed
dgedcf��dd���Z?ed
dgedcf��de���Z@edd
gdf�edcf��dg���ZAedd
gdf�edcf��dh���ZBed
dddg��di���ZCedd
gdj���dk���ZDed
ddg��dl���ZEedd
gdm���dn���ZFeddgd5���do���ZGed
ddg��dp���ZHeddgdq���dr���ZIedd
gds���dt���ZJed
dgeduf��dv���ZKed
dgeduf��dw���ZLeddgdx�eduf��dy���ZMeddd
geduf��dz���ZNedd
gd{���d|���ZOedd
gd{���d}���ZPeddgd~���d���ZQeddgd~���d����ZReddd
dged%f��d����ZSeddd
dged]f��d����ZTeddd
dged]f��d����ZUd��ZVd��ZWd��ZXd��ZYed
dd
gd�ed�f����d����ZZed
d
d
gd�ed�f����d����Z[ed
d
d
gd#ed�f����d����Z\edd
d
dgd�����d����Z]ed
dd
dg��d����Z^edd
g��d����Z_edHd
gd����d����Z`ed
dd
dg��d����Zaedd
g��d����ZbedHd
gd����d����Zceddgedcf����d����ZdeddHgedcf����d����Zeeddgedcf����d����Zfed
dd
dg��d����Zgeddgd����d����Zhd��Zied
dd
dg��d����ZjdS)��JumpTestCasec��|�tjtj����tjd��dSrrVrs rr�zJumpTestCase.setUp��4�������c�l�n�n�5�5�5���T�����rc��||kr=|�dt|��zdzdzt|��z��dSdS)NzOutputs don't match:
Expected: r�z
Received: )r��repr)r�expected�receiveds   r�compare_jump_outputz JumpTestCase.compare_jump_outputsj���x��	6��I�I�$�&*�8�n�n�5�7;�<�#�$�&*�8�n�n�5�
6�
6�
6�
6�
6�	6�	6rNr5Fc�,�t|||||��}tj|j��g}	|�||	��n-|j|�5||	��ddd��n#1swxYwYtjd��|�||	��dSr)r|rqrrr��assertRaisesRegexr��
rr�rr�r�r�r�r�r�rs
          rr�zJumpTestCase.run_tests����D�(�F�E�9�E�E����V�\�"�"�"����	��D��L�L�L�L�'��'��/�
�
���V����
�
�
�
�
�
�
�
�
�
�
����
�
�
�
���T����� � ��6�2�2�2�2�2s�A�A#�&A#c��t|||||��}tj|j��g}	|�t	j||	����n?|j|�5t	j||	����ddd��n#1swxYwYtjd��t	jd��|�||	��dSr)	r|rqrrr��asynciorFr��set_event_loop_policyr�r�s
          r�run_async_testzJumpTestCase.run_async_tests���D�(�F�E�9�E�E����V�\�"�"�"����	*��K���V���%�%�%�%�'��'��/�
*�
*���D�D��L�L�)�)�)�
*�
*�
*�
*�
*�
*�
*�
*�
*�
*�
*����
*�
*�
*�
*���T�����%�d�+�+�+�� � ��6�2�2�2�2�2s�B�B�
Bc�$������	�����fd�}|S)Nc�H���t���������fd���}|S)Nc	�@��|�������d���dS�NT)r�r�r�)r��rr�r�r�r�rr�s ������r�testz7JumpTestCase.jump_test.<locals>.decorator.<locals>.test(s<����
�
�d�H�f�h�$)��$��H�H�H�H�Hrr�r�r�r�r�r�rr�s` �����r�	decoratorz)JumpTestCase.jump_test.<locals>.decorator'�W����
�4�[�[�
H�
H�
H�
H�
H�
H�
H�
H�
H��[�
H��Krr"�rr�r�r�r�r�s````` r�	jump_testzJumpTestCase.jump_test#�A�������	�	�	�	�	�	�	�	�	�	��rc�$������	�����fd�}|S)Nc�H���t���������fd���}|S)Nc	�@��|�������d���dSr�)r�r�s ������rr�z=JumpTestCase.async_jump_test.<locals>.decorator.<locals>.test4s>����#�#�D�(�F�H�$)��$�$�H�H�H�H�Hrrr�s` �����rr�z/JumpTestCase.async_jump_test.<locals>.decorator3r�rr"r�s````` r�async_jump_testzJumpTestCase.async_jump_test/r�rr0r?c��|�d��|�d��|�d��dS�Nr0r=r?�r�rs r�test_jump_simple_forwardsz&JumpTestCase.test_jump_simple_forwards=�>���
�
�a�����
�
�a�����
�
�a�����rr=)r0r0r=c�Z�|�d��|�d��dSrQr�r�s r�test_jump_simple_backwardsz'JumpTestCase.test_jump_simple_backwardsC�,���
�
�a�����
�
�a�����rrAc��dD]1}|�d��dD]}|�d����2|�d��dS)Nr�r=�r?rHrAr��rr�rus   r�test_jump_out_of_block_forwardsz,JumpTestCase.test_jump_out_of_block_forwardsHsd���	!�	!�A��M�M�!�����
!�
!���
�
�a� � � � �
!��
�
�a�����rrW)r0r?rAr0r?rArWrJc���|�d��dD]F}|�d��dD]}|�d���|�d���G|�d��dS)Nr0r�r?)r=rArWrJr�r�s   r� test_jump_out_of_block_backwardsz-JumpTestCase.test_jump_out_of_block_backwardsPs����
�
�a�����	�	�A��M�M�!�����
!�
!���
�
�a� � � � ��M�M�!������
�
�a�����rrHc���K�dD][}tddg��23d{V��}|�d��|�d���26|�d���\dS)Nr�r0r=r?rHrA�r-r�rr�s  r�)test_jump_out_of_async_for_block_forwardsz6JumpTestCase.test_jump_out_of_async_for_block_forwardsZs������	�	�A�$�a��V�,�,�
!�
!�
!�
!�
!�
!�
!�a��
�
�a� � � ��
�
�a� � � � �-�
�M�M�!�����		�	s�A
)r=rHr=rHrArWc���K�dD]o}|�d��tdg��23d{V��}|�d��|�d���26|�d���pdS)Nr�r=r0rHrArW�rr-r�s  r�*test_jump_out_of_async_for_block_backwardsz7JumpTestCase.test_jump_out_of_async_for_block_backwardsbs������	�	�A��M�M�!����$�a�S�>�>�
!�
!�
!�
!�
!�
!�
!�a��
�
�a� � � ��
�
�a� � � � �*�
�M�M�!�����	�	s�Ac�Z�|�d��|�d��dS)Nr0r?r�r�s r�test_jump_to_codeless_linez'JumpTestCase.test_jump_to_codeless_lineks,���
�
�a�����
�
�a�����r)r0r=r?c��|�d��|�d��|�d��dSr�r�r�s r�test_jump_to_same_linez#JumpTestCase.test_jump_to_same_lineqr�rr(c��	|�d��|�d��	|�d��|�d��n#|�d��wxYw|�d��dS#|�d��	|�d��|�d��n#|�d��wxYw|�d��wxYw)Nr=rHrWr'r(r�r�s r�test_jump_in_nested_finallyz(JumpTestCase.test_jump_in_nested_finallyxs���	��M�M�!�����M�M�!����
!��
�
�a� � � ��
�
�a� � � � ���
�
�a� � � � �����M�M�!�������
�M�M�!����
!��
�
�a� � � ��
�
�a� � � � ���
�
�a� � � � �����M�M�!�������s.�B	�A�A/�	C;� C�5C;�C"�"C;rJ�c���	|�d��ddz	|�d��|�d��dS#|�d��|�d��wxYw)Nr=r0rrWrJr�r�s r�test_jump_in_nested_finally_2z*JumpTestCase.test_jump_in_nested_finally_2�s|��	��M�M�!����
�a�C�C���M�M�!�����M�M�!�������
�M�M�!�����M�M�!�������s�A	�	,A5rhc��	|�d��ddz	|�d��	|�d��|�d��n#|�d��wxYw|�d��dS#|�d��	|�d��|�d��n#|�d��wxYw|�d��wxYw)Nr=r0rrWr'r�rhr�r�s r�test_jump_in_nested_finally_3z*JumpTestCase.test_jump_in_nested_finally_3�s��
	��M�M�!����
�a�C�C���M�M�!����
"��
�
�a� � � ��
�
�b�!�!�!�!���
�
�b�!�!�!�!�����M�M�"�������
�M�M�!����
"��
�
�a� � � ��
�
�b�!�!�!�!���
�
�b�!�!�!�!�����M�M�"�������s.�B�A�A5�D�&C�;D�C(�(Drnc���	|�d��|�d��|�d��dS#|�d��|�d��YdSxYw�Nr=rHrAr�r�s r�5test_no_jump_over_return_try_finally_in_finally_blockzBJumpTestCase.test_no_jump_over_return_try_finally_in_finally_block�s{��
	��M�M�!�����M�M�!�����M�M�!�����F��
�M�M�!�����M�M�!�����F�F�F�

�D�D��A�,A2�afterc�Z�|�d��	|�d���)Nr0Tr?r�r�s r� test_no_jump_infinite_while_loopz-JumpTestCase.test_no_jump_infinite_while_loop�s0���
�
�a����	��M�M�!����	rc��d}|�d��|dkr"|�d��|dz
}|dk� dSdS)Nr0r=rHr�r�s  r�#test_jump_forwards_into_while_blockz0JumpTestCase.test_jump_forwards_into_while_block�sb��
���
�
�a�����1�f�	��M�M�!����
��F�A��1�f�	�	�	�	�	r)r?r?r?rAc��d}|dkr |�d��|dz
}|dk� |�d��dS)Nr0r=r?rAr�r�s  r�$test_jump_backwards_into_while_blockz1JumpTestCase.test_jump_backwards_into_while_block�sV��
���1�f�	��M�M�!����
��F�A��1�f�	�	�
�
�a�����rc��t|d��5|�d��ddd��n#1swxYwY|�d��dSr��r
rr�s r�$test_jump_forwards_out_of_with_blockz1JumpTestCase.test_jump_forwards_out_of_with_block����
�&�!�
$�
$�	�	��M�M�!����	�	�	�	�	�	�	�	�	�	�	����	�	�	�	��
�
�a�������3�7�7c���K�t|d��4�d{V��|�d��ddd���d{V��n#1�d{V��swxYwY|�d��dSr��r$rr�s r�*test_jump_forwards_out_of_async_with_blockz7JumpTestCase.test_jump_forwards_out_of_async_with_block�������$�V�Q�/�/�	�	�	�	�	�	�	�	��M�M�!����	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	��
�
�a�������A�
A�A)r0r=r0r=r?rec��|�d��t|d��5|�d��ddd��dS#1swxYwYdSr��rr
r�s r�%test_jump_backwards_out_of_with_blockz2JumpTestCase.test_jump_backwards_out_of_with_block�����
�
�a����
�&�!�
$�
$�	�	��M�M�!����	�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�	�	��A	�	A
�A
c���K�|�d��t|d��4�d{V��|�d��ddd���d{V��dS#1�d{V��swxYwYdSr��rr$r�s r�+test_jump_backwards_out_of_async_with_blockz8JumpTestCase.test_jump_backwards_out_of_async_with_block�������
�
�a����$�V�Q�/�/�	�	�	�	�	�	�	�	��M�M�!����	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�	�	��A�
A!�$A!c��	|�d��|�d��n#|�d��wxYw|�d��dSr�r�r�s r�+test_jump_forwards_out_of_try_finally_blockz8JumpTestCase.test_jump_forwards_out_of_try_finally_block��^��	��M�M�!�����M�M�!������F�M�M�!���������
�
�a������	�-�A)r0r0r?rAc��|�d��	|�d��|�d��dS#|�d��wxYw�Nr0r?rAr�r�s r�,test_jump_backwards_out_of_try_finally_blockz9JumpTestCase.test_jump_backwards_out_of_try_finally_block��[���
�
�a����	��M�M�!�����M�M�!�������F�M�M�!���������A�Ac��	|�d��n#|�d���xYw|�d��dS�Nr=rHrWr�r�s r�*test_jump_forwards_out_of_try_except_blockz7JumpTestCase.test_jump_forwards_out_of_try_except_block��R��	��M�M�!������	��M�M�!���������
�
�a��������0)r0r0r?c��|�d��	|�d��dS#|�d���xYwr�r�r�s r�+test_jump_backwards_out_of_try_except_blockz8JumpTestCase.test_jump_backwards_out_of_try_except_block��O���
�
�a����	��M�M�!�������	��M�M�!��������	�.�A)rHrJr'c���	ddznZ#t$r-|�d��|�d��Yn$t$r|�d��YnwxYw|�d��dS�Nr0rrHrArJr'�r�r�FloatingPointErrorr�s r�test_jump_between_except_blocksz,JumpTestCase.test_jump_between_except_blocks�s���	�
�a�C�C�C�� �	�	�	��M�M�!�����M�M�!������!�	�	�	��M�M�!������	�����
�
�a�����s��4A�A�Ac��	ddzn:#t$r-|�d��|�d��YnwxYw|�d��n#|�d��wxYw|�d��dSr)r�rr�s r� test_jump_from_except_to_finallyz-JumpTestCase.test_jump_from_except_to_finally	s���	�
�a�C�C�C�� �	�	�	��M�M�!�����M�M�!������	����
�M�M�!������F�M�M�!���������
�
�a�����s!��A�4?�A�?�A�A/)rHrWrJc���	ddznF#|�d��|�d��|�d��YnxYw|�d��dS)Nr0rrHrArWrJr�r�s r�test_jump_within_except_blockz*JumpTestCase.test_jump_within_except_blockso��	�
�a�C�C�C��	��M�M�!�����M�M�!�����M�M�!����������
�
�a�����s
��AA)r0rAr0rAc��|�d��	ddzn,#t$r}|�d��Yd}~nd}~wwxYwd}dS)Nr0rrArA�rr�)rr�r,s   r�test_jump_over_try_exceptz&JumpTestCase.test_jump_over_try_exceptsm���
�
�a����	�
��E�E�E�� �	�	�	��M�M�!�������������	�������s��
A�A�A)r0rHrAr�c�&�|�d��t|d��5|�d��ddd��n#1swxYwYt|d��5|�d��ddd��dS#1swxYwYdS�Nr0r=r?rHrAr�r�s r�test_jump_across_withz"JumpTestCase.test_jump_across_with'����
�
�a����
�&�!�
$�
$�	�	��M�M�!����	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�
�&�!�
$�
$�	�	��M�M�!����	�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�	�	�#�A�A�A�#B�B
�
B
c��rK�|�d��t|d��4�d{V��|�d��ddd���d{V��n#1�d{V��swxYwYt|d��4�d{V��|�d��ddd���d{V��dS#1�d{V��swxYwYdSr
r�r�s r�test_jump_across_async_withz(JumpTestCase.test_jump_across_async_with/�������
�
�a����$�V�Q�/�/�	�	�	�	�	�	�	�	��M�M�!����	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�$�V�Q�/�/�	�	�	�	�	�	�	�	��M�M�!����	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�	�	�#�A�
A �#A �=B&�&
B0�3B0)r0r?rArWc��|�d��dD]T}t|d��5|�d��ddd��n#1swxYwY|�d���U|�d��dS�Nr0r�r?rHrArWr�r�s  r�,test_jump_out_of_with_block_within_for_blockz9JumpTestCase.test_jump_out_of_with_block_within_for_block7s����
�
�a�����	�	�A��f�a�(�(�
!�
!��
�
�a� � � �
!�
!�
!�
!�
!�
!�
!�
!�
!�
!�
!����
!�
!�
!�
!��M�M�!������
�
�a�����s�A�A	�A	c��0K�|�d��dD]f}t|d��4�d{V��|�d��ddd���d{V��n#1�d{V��swxYwY|�d���g|�d��dSrr�r�s  r�2test_jump_out_of_async_with_block_within_for_blockz?JumpTestCase.test_jump_out_of_async_with_block_within_for_block@s%�����
�
�a�����	�	�A�(���3�3�
!�
!�
!�
!�
!�
!�
!�
!��
�
�a� � � �
!�
!�
!�
!�
!�
!�
!�
!�
!�
!�
!�
!�
!�
!�
!�
!�
!�
!�
!�
!�
!�
!�
!����
!�
!�
!�
!��M�M�!������
�
�a�����s�A�
A$	�'A$	)r0r=r?rArerWc�N�|�d��t|d��5t|d��5|�d��ddd��n#1swxYwY|�d��ddd��n#1swxYwY|�d��dS�Nr0r=r?rHrArWr�r�s r�-test_jump_out_of_with_block_within_with_blockz:JumpTestCase.test_jump_out_of_with_block_within_with_blockIs���
�
�a����
�&�!�
$�
$�	�	��f�a�(�(�
!�
!��
�
�a� � � �
!�
!�
!�
!�
!�
!�
!�
!�
!�
!�
!����
!�
!�
!�
!��M�M�!����	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�	�
�
�a�����s4�B�A�
B�A	�B� A	�!B�B	�B	c��vK�|�d��t|d��5t|d��4�d{V��|�d��ddd���d{V��n#1�d{V��swxYwY|�d��ddd��n#1swxYwY|�d��dSr)rr
r$r�s r�3test_jump_out_of_async_with_block_within_with_blockz@JumpTestCase.test_jump_out_of_async_with_block_within_with_blockRsz�����
�
�a����
�&�!�
$�
$�	�	�(���3�3�
!�
!�
!�
!�
!�
!�
!�
!��
�
�a� � � �
!�
!�
!�
!�
!�
!�
!�
!�
!�
!�
!�
!�
!�
!�
!�
!�
!�
!�
!�
!�
!�
!�
!����
!�
!�
!�
!��M�M�!����	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�	�
�
�a�����s4�B�A'�B�'
A1	�1B�4A1	�5B�B� B)r=rHrWrJc��	|�d��t|d��5|�d��ddd��n#1swxYwY|�d��nW#t|d��5|�d��ddd��n#1swxYwY|�d��wxYw|�d��dS�Nr=rHrArWrJr�r�s r�0test_jump_out_of_with_block_within_finally_blockz=JumpTestCase.test_jump_out_of_with_block_within_finally_block[sO��	��M�M�!�����f�a�(�(�
!�
!��
�
�a� � � �
!�
!�
!�
!�
!�
!�
!�
!�
!�
!�
!����
!�
!�
!�
!��M�M�!�������f�a�(�(�
!�
!��
�
�a� � � �
!�
!�
!�
!�
!�
!�
!�
!�
!�
!�
!����
!�
!�
!�
!��M�M�!���������
�
�a�����s@�A*�A	�	A
�A
�*B>�;B�B>�B!�!B>�$B!�%B>c��K�	|�d��t|d��4�d{V��|�d��ddd���d{V��n#1�d{V��swxYwY|�d��ni#t|d��4�d{V��|�d��ddd���d{V��n#1�d{V��swxYwY|�d��wxYw|�d��dSr r�r�s r�6test_jump_out_of_async_with_block_within_finally_blockzCJumpTestCase.test_jump_out_of_async_with_block_within_finally_blockes����	��M�M�!����(���3�3�
!�
!�
!�
!�
!�
!�
!�
!��
�
�a� � � �
!�
!�
!�
!�
!�
!�
!�
!�
!�
!�
!�
!�
!�
!�
!�
!�
!�
!�
!�
!�
!�
!�
!����
!�
!�
!�
!��M�M�!������)���3�3�
!�
!�
!�
!�
!�
!�
!�
!��
�
�a� � � �
!�
!�
!�
!�
!�
!�
!�
!�
!�
!�
!�
!�
!�
!�
!�
!�
!�
!�
!�
!�
!�
!�
!����
!�
!�
!�
!��M�M�!���������
�
�a�����s@�A>�A�
A!�$A!�>C$�B=�+C$�=
C�C$�
C�C$r')r0r?rArhrqc��|�d��dD]�}|�d��dD]b}|�d��	dD]}|�d���	|�d���I#|�d��wxYw|�d����|�d	��dS)
Nr0r�r?r�rAr'r�rhrqr�)rr�ru�ks    r�&test_jump_out_of_complex_nested_blocksz3JumpTestCase.test_jump_out_of_complex_nested_blocksos����
�
�a�����		�		�A��M�M�!�����
&�
&���
�
�a� � � �&�#�)�)���
�
�a�(�(�(�(�)��M�M�"�%�%�%�%��F�M�M�"�%�%�%�%�����M�M�"������
�
�b�����s�	A:�:B)r0r=rAc���|�d��t|d��5}|�d��ddd��n#1swxYwY|�d��dS�Nr0r=rHrAr��rr,s  r� test_jump_out_of_with_assignmentz-JumpTestCase.test_jump_out_of_with_assignment~s����
�
�a����
�&�!�
$�
$�	���M�M�!����	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�	�
�
�a�����s�A�A�Ac��K�|�d��t|d��4�d{V��	}|�d��ddd���d{V��n#1�d{V��swxYwY|�d��dSr(r�r)s  r�&test_jump_out_of_async_with_assignmentz3JumpTestCase.test_jump_out_of_async_with_assignment�s�����
�
�a����$�V�Q�/�/�	�	�	�	�	�	�	�	���M�M�!����	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�	�
�
�a�����s�A�
A!�$A!)r0rWr'r(c�D�|�d��	|�d��|s	|�d��dS|�d��|�d��n#|�d��wxYw|�d��dS)Nr0r?r'rWr(r�r�s r�*test_jump_over_return_in_try_finally_blockz7JumpTestCase.test_jump_over_return_in_try_finally_block�s����
�
�a����	��M�M�!�����
��
�M�M�!������
�M�M�!�����M�M�!������F�M�M�!���������
�
�a�����s�A1�A1�1B)r0r?r'r�rhr�c��|�d��	|�d��	|�d��|s	|�d��n[|�d��|�d��n#|�d��wxYw|�d��	|�d��dS)	Nr0Tr?rAr�r'rhr�r�r�s r�)test_jump_over_break_in_try_finally_blockz6JumpTestCase.test_jump_over_break_in_try_finally_block�s����
�
�a����
	��M�M�!����
"��
�
�a� � � �����
�
�b�!�!�!�!��
�
�a� � � ��
�
�b�!�!�!�!���
�
�b�!�!�!�!�����M�M�"������
�
�b�����s�B�B�Bc���|�d��|sdD]}|�d���n*|�d��|�d��|�d��dS�Nr0r�rHrWrJr'r�r�s  r�$test_jump_over_for_block_before_elsez1JumpTestCase.test_jump_over_for_block_before_else�����
�
�a�����	��
!�
!���
�
�a� � � � �
!�
�M�M�!�����M�M�!�����
�
�a�����rc��K�|�d��|s/tdg��23d{V��}|�d���6n*|�d��|�d��|�d��dS�Nr0r?rHrWrJr'r�r�s  r�*test_jump_over_async_for_block_before_elsez7JumpTestCase.test_jump_over_async_for_block_before_else�������
�
�a�����	�$�a�S�>�>�
!�
!�
!�
!�
!�
!�
!�a��
�
�a� � � � �*�>�
�M�M�!�����M�M�!�����
�
�a�������Ac�Z�|�d��|�d��dSrQr�r�s r�test_no_jump_too_far_forwardsz*JumpTestCase.test_no_jump_too_far_forwards�r�rre�beforec�Z�|�d��|�d��dSrQr�r�s r�test_no_jump_too_far_backwardsz+JumpTestCase.test_no_jump_too_far_backwards�r�r�exceptc�h�	|�d��dS#|�d���xYw�Nr=rHr�r�s r�test_no_jump_to_except_1z%JumpTestCase.test_no_jump_to_except_1�s=��	��M�M�!�������	��M�M�!�������s��1c�z�	|�d��dS#t$r|�d���wxYwrA�rr�r�s r�test_no_jump_to_except_2z%JumpTestCase.test_no_jump_to_except_2�sO��	��M�M�!��������	�	�	��M�M�!�����	���s��!:c��	|�d��dS#t$r}|�d��|�d}~wwxYwrArDr�s  r�test_no_jump_to_except_3z%JumpTestCase.test_no_jump_to_except_3�sU��	��M�M�!��������	�	�	��M�M�!�����G�����	���s��
?�:�?c��	|�d��dS#ttf$r}|�d��|�d}~wwxYwrA)rr�r|r�s  r�test_no_jump_to_except_4z%JumpTestCase.test_no_jump_to_except_4�sZ��	��M�M�!��������L�)�	�	�	��M�M�!�����G�����	���s��A�A�A�intoc�d�|�d��dD]}|�d���dS)Nr0r�r?r�r�s  r�$test_no_jump_forwards_into_for_blockz1JumpTestCase.test_no_jump_forwards_into_for_block�sB���
�
�a�����	�	�A��M�M�!�����	�	rc��K�|�d��tddg��23d{V��}|�d���6dSr�r�r�s  r�*test_no_jump_forwards_into_async_for_blockz7JumpTestCase.test_no_jump_forwards_into_async_for_block�sk�����
�
�a���� �!�Q��(�(�	�	�	�	�	�	�	�!��M�M�!�����)��s�Ac�d�dD]}|�d���|�d��dS)Nr�r=r?r�r�s  r�%test_no_jump_backwards_into_for_blockz2JumpTestCase.test_no_jump_backwards_into_for_block�s>���	�	�A��M�M�!������
�
�a�����rz&can't jump into the body of a for loopc��K�tddg��23d{V��}|�d���6|�d��dSr�r�r�s  r�+test_no_jump_backwards_into_async_for_blockz8JumpTestCase.test_no_jump_backwards_into_async_for_block	sl���� �!�Q��(�(�	�	�	�	�	�	�	�!��M�M�!�����)��
�
�a�����s�1�stackc��|�d��t|d��5|�d��ddd��dS#1swxYwYdSr�r�r�s r�%test_no_jump_forwards_into_with_blockz2JumpTestCase.test_no_jump_forwards_into_with_block	r�r�c���K�|�d��t|d��4�d{V��|�d��ddd���d{V��dS#1�d{V��swxYwYdSr�r�r�s r�+test_no_jump_forwards_into_async_with_blockz8JumpTestCase.test_no_jump_forwards_into_async_with_block	r�r�)r0r=r�c��t|d��5|�d��ddd��n#1swxYwY|�d��dSr�r�r�s r�&test_no_jump_backwards_into_with_blockz3JumpTestCase.test_no_jump_backwards_into_with_block	r�r�c���K�t|d��4�d{V��|�d��ddd���d{V��n#1�d{V��swxYwY|�d��dSr�r�r�s r�,test_no_jump_backwards_into_async_with_blockz9JumpTestCase.test_no_jump_backwards_into_async_with_block	r�r�c��|�d��	|�d��|�d��dS#|�d��wxYwr�r�r�s r�)test_jump_forwards_into_try_finally_blockz6JumpTestCase.test_jump_forwards_into_try_finally_block	r�r�)r=rHr=rHrAc��	|�d��|�d��n#|�d��wxYw|�d��dSr�r�r�s r�*test_jump_backwards_into_try_finally_blockz7JumpTestCase.test_jump_backwards_into_try_finally_block&	r�r�c��|�d��	|�d��dS#|�d���xYwr�r�r�s r�(test_jump_forwards_into_try_except_blockz5JumpTestCase.test_jump_forwards_into_try_except_block.	r�r�)r=r=rWc��	|�d��n#|�d���xYw|�d��dSr�r�r�s r�)test_jump_backwards_into_try_except_blockz6JumpTestCase.test_jump_backwards_into_try_except_block7	r�r�c��	ddzna#t$r-|�d��|�d��Yn+t$r}|�d��Yd}~nd}~wwxYw|�d��dSrrr�s  r�!test_jump_between_except_blocks_2z.JumpTestCase.test_jump_between_except_blocks_2A	s���	�
�a�C�C�C�� �	�	�	��M�M�!�����M�M�!������!�	�	�	��M�M�!�������������	�����
�
�a�����s��4A&�	A&�A!�!A&c��|�d��	|�d��|�d��dS#|�d��wxYwr�r�r�s r�test_jump_into_finally_blockz)JumpTestCase.test_jump_into_finally_blockL	r�r�)r=rWrJc�:�	|�d��|�d��|�d��|�d��n/#|�d��|�d��wxYw|�d��dS)Nr=r?rArWrJr�r�s r�+test_jump_into_finally_block_from_try_blockz8JumpTestCase.test_jump_into_finally_block_from_try_blockT	s���	��M�M�!�����M�M�!�����M�M�!�����M�M�!������
�M�M�!�����M�M�!���������
�
�a�����s�*A�,B)r0r?r0r?rAc��|�d��	|�d��|�d��dS#|�d��wxYwr�r�r�s r�test_jump_out_of_finally_blockz+JumpTestCase.test_jump_out_of_finally_block^	r�r�z9can't jump into an 'except' block as there's no exceptionc��|�d��	|�d��dS#|�d��YdSxYwr�r�r�s r�#test_no_jump_into_bare_except_blockz0JumpTestCase.test_no_jump_into_bare_except_blockf	sU���
�
�a����	��M�M�!�������	��M�M�!���������s	�.�Ac��|�d��	|�d��dS#t$r|�d��YdSwxYwr��rrir�s r�(test_no_jump_into_qualified_except_blockz5JumpTestCase.test_no_jump_into_qualified_except_blockn	sg���
�
�a����	��M�M�!��������	�	�	��M�M�!�������	���s�.�A�A)r=rArWc���	|�d��|�d��n0#|�d��|�d���xYw|�d��dS�Nr=r?rArWr'r�r�s r�2test_no_jump_into_bare_except_block_from_try_blockz?JumpTestCase.test_no_jump_into_bare_except_block_from_try_blockv	sv��	��M�M�!�����M�M�!������	��M�M�!�����M�M�!���������
�
�a�����s	�*-�-Ac��	|�d��|�d��n9#t$r,|�d��|�d���wxYw|�d��dSrrr
r�s r�7test_no_jump_into_qualified_except_block_from_try_blockzDJumpTestCase.test_no_jump_into_qualified_except_block_from_try_block�	s���	��M�M�!�����M�M�!������ �	�	�	��M�M�!�����M�M�!�����	����	�
�
�a�����s	�*-�6A#)r0r?rWr0r?rWrJc���|�d��	|�d��ddzdS#|�d��|�d��YdSxYw�Nr0r?rrWrJr�r�s r�"test_jump_out_of_bare_except_blockz/JumpTestCase.test_jump_out_of_bare_except_block�	sn���
�
�a����	��M�M�!����
�a�C�C�C�C��	��M�M�!�����M�M�!���������s	�3�,A"c���|�d��	|�d��ddzdS#t$r.|�d��|�d��YdSwxYwrwror�s r�'test_jump_out_of_qualified_except_blockz4JumpTestCase.test_jump_out_of_qualified_except_block�	s����
�
�a����	��M�M�!����
�a�C�C�C�C���	�	�	��M�M�!�����M�M�!�������	���s�3�4A+�*A+)r0r=rArec�&�|�d��t|d��5|�d��ddd��n#1swxYwYt|d��5|�d��ddd��dS#1swxYwYdSr
r�r�s r�test_jump_between_with_blocksz*JumpTestCase.test_jump_between_with_blocks�	rrc��rK�|�d��t|d��4�d{V��|�d��ddd���d{V��n#1�d{V��swxYwYt|d��4�d{V��|�d��ddd���d{V��dS#1�d{V��swxYwYdSr
r�r�s r�#test_jump_between_async_with_blocksz0JumpTestCase.test_jump_between_async_with_blocks�	rrc���	|�d��|�d��|�d��dS#|�d��|�d��YdSxYwr�r�r�s r�-test_no_jump_over_return_out_of_finally_blockz:JumpTestCase.test_no_jump_over_return_out_of_finally_block�	sx��	��M�M�!�����M�M�!�����M�M�!�����F��
�M�M�!�����M�M�!�����F�F�F�F�F�Fr�c���|�d��|sdD]}|�d���n*|�d��|�d��|�d��dSr2r�r�s  r�'test_no_jump_into_for_block_before_elsez4JumpTestCase.test_no_jump_into_for_block_before_else�	r4rc��K�|�d��|s/tdg��23d{V��}|�d���6n*|�d��|�d��|�d��dSr6r�r�s  r�-test_no_jump_into_async_for_block_before_elsez:JumpTestCase.test_no_jump_into_async_for_block_before_else�	r8r9c�B�|�tdddg��dS)Nr=�SpamT)r�r�rs r�test_no_jump_to_non_integersz)JumpTestCase.test_no_jump_to_non_integers�	s#���
�
�-�q�&�4�&�A�A�A�A�Arc�"�t��dSr)r�rs r�#test_no_jump_without_trace_functionz0JumpTestCase.test_no_jump_without_trace_function�	s��	'�(�(�(�(�(rc�r�i}tddz|��|d}|�|dddg��dS)Na�def f(output):        # line 0
            x = 0                     # line 1
            y = 1                     # line 2
            '''                       # line 3
            %s                        # lines 4-1004
            '''                       # line 1005
            x += 1                    # line 1006
            output.append(x)          # line 1007
            return)a�







































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































rr=i�r)rr�)rr�rs   r�test_large_functionz JumpTestCase.test_large_function�	sX������'�'�)*�	+�	+�	+�
�c�F���
�
�a��D�1�#�&�&�&�&�&rc�(��tddd���G�fd�d��}t|dd��}tj|j��dgi}t�|��tjd��|�gd	�|d��dS)
Nzd
# Comments don't count.
output.append(2)  # firstlineno is here.
output.append(3)
output.append(4)
z
<fake module>rc���eZdZ�ZdS)�<JumpTestCase.test_jump_to_firstlineno.<locals>.fake_functionN)rr r!r�)r~s�r�
fake_functionr��	s��������H�H�Hrr�rHr0r)r=r?r=r?rH)�compiler|rqrrr�rr�)rr�r�rr~s    @r�test_jump_to_firstlinenoz%JumpTestCase.test_jump_to_firstlineno�	s������
�f����	�	�	�	�	�	�	�	�	�	��M�1�a�0�0����V�\�"�"�"��r�N�	��T�9������T����� � ����)�H�2E�F�F�F�F�Frr3z5can't jump from the 'call' trace event of a new frame)r�r�c�z����d���fd�}|����d��dS)Nr0c�2����d��dSr
r�r�s�r�nestedz3JumpTestCase.test_no_jump_from_call.<locals>.nested�	s����M�M�!�����rrAr�)rr�s` r�test_no_jump_from_callz#JumpTestCase.test_no_jump_from_call�	sS���	�
�
�a����	�	�	�	�	�������
�
�a�����rr7z'can only jump from a 'line' trace eventc�0�|�d��dSr/r�r�s r�test_no_jump_from_return_eventz+JumpTestCase.test_no_jump_from_return_event
s��	�
�
�a�����rc�:�|�d��ddzdSr�r�r�s r�!test_no_jump_from_exception_eventz.JumpTestCase.test_no_jump_from_exception_event
s#��	�
�
�a����	�A����r)r�c�j���fd�}t|������d��dS)Nc3�>�K���d��dV�dS)Nr=r?r�r�s�rr,z.JumpTestCase.test_jump_from_yield.<locals>.gen
s&������M�M�!�����G�G�G�G�GrrA)r:r)rr,s` r�test_jump_from_yieldz!JumpTestCase.test_jump_from_yield
sG���	�	�	�	�	�	
�S�S�U�U�����
�
�a�����rc��|�d��d�td��D��}|�d��dS)Nr0c��g|]}|��Sr"r"�r�r�s  rr�z@JumpTestCase.test_jump_forward_over_listcomp.<locals>.<listcomp>
���"�"�"�1�Q�"�"�"rr�r?�rrSr)s  r�test_jump_forward_over_listcompz,JumpTestCase.test_jump_forward_over_listcomp
sE���
�
�a����"�"��b�	�	�"�"�"���
�
�a�����rc�@�d}d�td��D��}d}dS)Nr0c��g|]}|��Sr"r"r�s  rr�zAJumpTestCase.test_jump_backward_over_listcomp.<locals>.<listcomp>!
r�rr�r?rR�rrTr,r�s    r� test_jump_backward_over_listcompz-JumpTestCase.test_jump_backward_over_listcomp
s)��
��"�"��b�	�	�"�"�"��
���r)r=rJr=c���d}|�d��|rdSd�td��D��}d}|�d��|�d��dS)NFr=c��g|]}|��Sr"r"r�s  rr�zDJumpTestCase.test_jump_backward_over_listcomp_v2.<locals>.<listcomp>*
s��!�!�!�1�Q�!�!�!rrArWrJr'r��r�flagr,s   r�#test_jump_backward_over_listcomp_v2z0JumpTestCase.test_jump_backward_over_listcomp_v2$
sn�����
�
�a�����	��F�!�!��a���!�!�!�����
�
�a�����
�
�a�����rc��K�|�d��d�ttd����2���d{V��}|�d��dS)Nr0c��"K�g|3d{V��}|��
6Srr"r�s  rr�zFJumpTestCase.test_jump_forward_over_async_listcomp.<locals>.<listcomp>2
�.����3�3�3�3�3�3�3�3��Q�3�3�3�3��r�r?�rr-rSr)s  r�%test_jump_forward_over_async_listcompz2JumpTestCase.test_jump_forward_over_async_listcomp/
sc�����
�
�a����3�3�i��b�	�	�2�2�3�3�3�3�3�3�3�3�3���
�
�a�����rc��jK�d}d�ttd����2���d{V��}d}dS)Nr0c��"K�g|3d{V��}|��
6Srr"r�s  rr�zGJumpTestCase.test_jump_backward_over_async_listcomp.<locals>.<listcomp>8
r�r�r�r?)r-rSr�s    r�&test_jump_backward_over_async_listcompz3JumpTestCase.test_jump_backward_over_async_listcomp5
sG����
��3�3�i��b�	�	�2�2�3�3�3�3�3�3�3�3�3��
���rc���K�d}|�d��|rdSd�ttd����2���d{V��}d}|�d��|�d��dS)NFr=c��"K�g|3d{V��}|��
6Srr"r�s  rr�zJJumpTestCase.test_jump_backward_over_async_listcomp_v2.<locals>.<listcomp>A
s.����2�2�2�2�2�2�2�2��Q�2�2�2�2r�rArWrJr'r�r�s   r�)test_jump_backward_over_async_listcomp_v2z6JumpTestCase.test_jump_backward_over_async_listcomp_v2;
s��������
�
�a�����	��F�2�2�i��a���1�1�2�2�2�2�2�2�2�2�2�����
�
�a�����
�
�a�����r)r�c��d}t|�d����|�d��|dzdz|�d��dS�Nr0r?rAr�r�r�rkr�rrTs  r�(test_jump_with_null_on_stack_load_globalz5JumpTestCase.test_jump_with_null_on_stack_load_globalG
sr��
��
��M�M�!���	
�	
�	
�	�
�
�a�������

�

�
�	�
�
�b�����rc��d}t}||�d����|�d��|dzdz|�d��dS)Nr0rHrWrhrj�r�)rrTrs   r�&test_jump_with_null_on_stack_push_nullz3JumpTestCase.test_jump_with_null_on_stack_push_nullZ
sy��
����	���M�M�!���	
�	
�	
�	�
�
�a�������

�

�
�	�
�
�b�����rc��d}t�|d��|�d��|dzdz|�d��dSr�)�listrr�s  r�&test_jump_with_null_on_stack_load_attrz3JumpTestCase.test_jump_with_null_on_stack_load_attrn
sl��
������A�	
�	
�	
�	�
�
�a�������

�

�
�	�
�
�b�����rc��|�d��|�d��pd�^}}}|�d��dS�Nr0r=r�r?r��rr.s  r�(test_jump_extended_args_unpack_ex_simplez5JumpTestCase.test_jump_extended_args_unpack_ex_simple�
sH���
�
�a�����=�=��#�#�-�v���A�q��
�
�a�����r)r0rHrHrAc��|�d��|�d��pd�^}}}|�d��dS)Nr0rHr�rAr�r�s  r�(test_jump_extended_args_unpack_ex_trickyz5JumpTestCase.test_jump_extended_args_unpack_ex_tricky�
sN���
�
�a����
�M�M�!���&��	
�
��1��
�
�a�����rc���dddgd�tdd��D���d�}i}td�|��|��|d	}|�|d
dddg��dS)Nzdef f(output):z    output.append(1)z    for _ in spam:c3�"K�|]
}d|�d�V��dS)z        output.append(�)Nr"r�s  rr�z@JumpTestCase.test_jump_extended_args_for_iter.<locals>.<genexpr>�
s.����
G�
G��+�q�+�+�+�
G�
G�
G�
G�
G�
Grr?i��z    output.append(100_000)r�rr=r0)rSrr�r�)r�sourcerrs    r� test_jump_extended_args_for_iterz-JumpTestCase.test_jump_extended_args_for_iter�
s���
�"� �
�H�
G�U�1�g�5F�5F�
G�
G�
G�	
�

*�
���	��T�Y�Y�v�
�
�	�*�*�*��c�N���
�
�a�!�W�q�'�l�3�3�3�3�3rc��|�d��|�d��od}|�d��dSr�r�r�s  r�test_jump_or_popzJumpTestCase.test_jump_or_pop�
sB���
�
�a�����M�M�!���'����
�
�a�����r)Nr5Frb)krr r!r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrrr!r#r&r*r,r.r0r3r7r;r>rBrErGrIrLrNrPrRrUrWrYr[r]r_rarcrergrirkrmrprsrurxrzr|r~r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r"rrr�r��s6���������6�6�6�@D�).�3�3�3�3�FJ�).�3�3�3�3�
�
�
�
�
�
�
�
��Y�q�!�a�S��������
�Y�q�!�Y�Y�Y����� ����Y�q�!�a��V���������Y�q�!�-�-�-�.�.���/�.���_�Q��A�q�6�"�"���#�"���_�Q��-�-�-�.�.���/�.���Y�q�!�a�S��������
�Y�q�!�Y�Y�Y����� ����Y�q�!�a��V���	�	���	��Y�q�!�a��V�/��4�5�5���6�5���Y�q�"�q�"�g� 1�2�6�7�7���8�7���Y�q�"�q�!�f�z�;�7�8�8���9�8���Y�q�!�a�S�:�w�/�0�0���1�0���Y�q�!�a��V���������Y�q�!�\�\�\�"�"���#�"���Y�q�!�a��V��������
�_�Q��A�q�6�"�"���#�"��
�Y�q�!�(�(�(�)�)���*�)��
�_�Q��.�.�.�/�/���0�/��
�Y�q�!�a�S���������Y�q�!�\�\�\�"�"���#�"���Y�q�!�a�S���������Y�q�!�Y�Y�Y����� ����Y�q�!�Y�Y�Y����� ����Y�q�!�Y�Y�Y����� ����Y�q�!�Y�Y�Y����� ����Y�q�!�\�\�\�"�"���#�"���Y�q�!�]�]�]�#�#���$�#���_�Q��=�=�=�)�)���*�)���Y�q�!�\�\�\�"�"���#�"���_�Q��<�<�<�(�(���)�(���Y�q�!�(�(�(�)�)���*�)���_�Q��.�.�.�/�/���0�/���Y�q�!�\�\�\�"�"���#�"���_�Q��<�<�<�(�(���)�(���Y�q�"�'�'�'�(�(���)�(���Y�q�!�Y�Y�Y����� ����_�Q��9�9�9�%�%���&�%���Y�q�!�\�\�\�"�"�	�	�#�"�	��Y�q�!�*�*�*�+�+�
�
�,�+�
��Y�q�!�a��V���������_�Q��A�q�6�"�"���#�"���Y�q�!�a�S�:�w�/�0�0���1�0���Y�q�"�q�c�J��1�2�2���3�2��
�Y�q�!�a�S�:�x�0�1�1���2�1���Y�q�!�a�S�:�x�0�1�1���2�1���Y�q�!�a�S�:�x�0�1�1���2�1���Y�q�!�a�S�:�x�0�1�1���2�1���Y�q�!�R�*�f�-�.�.���/�.��
�_�Q��2�
�F�3�4�4�
�
�5�4�
��Y�q�!�a��V�j�&�1�2�2���3�2��
�_�Q��A�q�6�J�0X�#Y�Z�Z���[�Z��
�Y�q�!�R�*�g�.�/�/���0�/��
�_�Q��2�
�G�4�5�5���6�5��
�Y�q�!�Z�Z�Z�*�g�!6�7�7���8�7��
�_�Q��:�:�:�
�G�'<�=�=���>�=��
�Y�q�!�a��V���������Y�q�!�_�_�_�%�%���&�%���Y�q�!�a�S���������Y�q�!�Y�Y�Y����� ����Y�q�!�Y�Y�Y����� ����Y�q�!�a�S���������Y�q�!�Y�Y�Y����� ����Y�q�!�_�_�_�%�%���&�%���Y�q�!�R�*�&a�b�c�c���d�c���Y�q�!�R�*�&a�b�c�c���d�c���Y�q�!�Y�Y�Y��-h� i�j�j���k�j���Y�q�!�a�S�:�'b�c�d�d���e�d���Y�q�!�*�*�*�+�+���,�+���Y�q�!�*�*�*�+�+���,�+���Y�q�!�]�]�]�#�#���$�#���_�Q��=�=�=�)�)���*�)���Y�q�!�a��V�j�'�2�3�3���4�3���Y�q�!�a��V�j�&�1�2�2���3�2���_�Q��A�q�6�J��#7�8�8���9�8��B�B�B�)�)�)�
'�'�'�G�G�G�&�Y�q�!�a�S��z�<8�/9�:�:�:���:�:���Y�q�!�a�S���8�1:�;�;�;���;�;���Y�q�!�a�S��J�8�4:�;�;�;���;�;���Y�q�!�a��V�8�,�,�,���-�,���Y�q�!�a��V���������Y�q�!�R��������
�Y�q�!�Y�Y�Y����� ����_�Q��A�q�6�"�"���#�"��
�_�Q��2��������
�_�Q��9�9�9�%�%���&�%���Y�q�!�R�
�G�4�5�5�5���6�5��$�Y�q�!�R�
�G�4�5�5�5���6�5��&�Y�q�!�R�
�G�4�5�5�5���6�5��"�Y�q�!�a��V��������
�Y�q�!�\�\�\�"�"���#�"��
4�
4�
4��Y�q�!�a��V���������rr�c�&�eZdZd�Zd�Zd�Zd�ZdS)�TestExtendedArgsc��|�tjtj����tjd��dSrrVrs rr�zTestExtendedArgs.setUp�
r�rc����td��D]}|���
dddd����fd��tj���|��tjd���S)N�r�r3r5r7c�(���|xxdz
cc<�Sr/r")r�r�r��countsr�s   ��rr�z,TestExtendedArgs.count_traces.<locals>.trace�
s����5�M�M�M�Q��M�M�M��Lr)rSrqrr)rr�r.r�r�s   @@r�count_traceszTestExtendedArgs.count_traces�
s������r���	�	�A��D�F�F�F�F��Q�!�4�4��	�	�	�	�	�	�	��U�����������T�����
rc��i}d}t||��|�|d��}|�|dddd���dS)Na"def f():
  (y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   y,
   ) = range(300)rr0i-r�)rr�r5)r�nsr~r�s    r�test_trace_unpack_long_sequencez0TestExtendedArgs.test_trace_unpack_long_sequence�
sV��
��A���T�2�����"�"�2�c�7�+�+������!�S�A�!F�!F�G�G�G�G�Grc�@�d�d�d�td��D������}d�td��D��}t||��|�|d��}|�|dddd	���dS)
Nzeif 1:
            def f():
                return (
                    {}
                )
        z
+
c3�"K�|]
}d|�d�V��dS)�varr�Nr"r�s  rr�z>TestExtendedArgs.test_trace_lots_of_globals.<locals>.<genexpr>�
s*����A�A���a����A�A�A�A�A�Ari�c��i|]}d|��|��	S)r�r"r�s  r�
<dictcomp>z?TestExtendedArgs.test_trace_lots_of_globals.<locals>.<dictcomp>�
s ��
0�
0�
0�q�i�A�i�i��
0�
0�
0rrr0i�r�)�formatr�rSrr�r5)rr~r�r�s    r�test_trace_lots_of_globalsz+TestExtendedArgs.test_trace_lots_of_globals�
s����

�F�7�<�<�A�A�U�4�[�[�A�A�A�A�A�B�B�	
�1�
0�E�$�K�K�
0�
0�
0���T�2�����"�"�2�c�7�+�+������!�T�Q�!G�!G�H�H�H�H�HrN)rr r!r�r�r�r�r"rrr�r��
sX������������ H�H�H�
I�
I�
I�
I�
Irr�c� �eZdZd�Zd�Zd�ZdS)�
TestEdgeCasesc��|�tjtj����tjd��dSrrVrs rr�zTestEdgeCases.setUp�
r�rc����d�}d��G�fd�d��}tj|����tj��5}tj|��|�|jj|j��|�|jj	t��ddd��n#1swxYwY|�tj��|��dS)Nc��dSrr"r�s rr�z*TestEdgeCases.test_reentrancy.<locals>.foo�
����Crc��dSrr"r�s r�barz*TestEdgeCases.test_reentrancy.<locals>.bar�
r�rc� ��eZdZd�Z�fd�ZdS)�(TestEdgeCases.test_reentrancy.<locals>.Ac��dSrr")rr�s  r�__call__z1TestEdgeCases.test_reentrancy.<locals>.A.__call__�
r�rc�0��tj���dSrr�)rr�s �r�__del__z0TestEdgeCases.test_reentrancy.<locals>.A.__del__�
s�����S�!�!�!�!�!rN)rr r!r�r�)r�s�rr�r��
s=�������
�
�
�
"�
"�
"�
"�
"�
"�
"rr�)rqrrr�catch_unraisable_exceptionr5�
unraisable�objectr�rv�	exc_valuer|r�)rr�r��cmr�s    @r�test_reentrancyzTestEdgeCases.test_reentrancy�
sH���	�	�	�	�	�	�	"�	"�	"�	"�	"�	"�	"�	"�	"�	"�	��Q�Q�S�S����
�
/�
1�
1�	I�R��L��������R�]�1�1�9�=�=�=��!�!�"�-�"9�<�H�H�H�	I�	I�	I�	I�	I�	I�	I�	I�	I�	I�	I����	I�	I�	I�	I�
	
��������-�-�-�-�-s�AB1�1B5�8B5c��d�}tj|��~tjtj����dS)Nc��dSrr"r�s rr�z+TestEdgeCases.test_same_object.<locals>.foo�
r�r)rqrrr�)rr�s  r�test_same_objectzTestEdgeCases.test_same_object�
sB��	�	�	�	��S�������S�\�^�^�$�$�$�$�$rN)rr r!r�r�r�r"rrr�r��
sA���������.�.�.�.%�%�%�%�%rr��__main__)6r�r�unittest�
unittest.mockrrqr�r��	functoolsrr��test.supportr�requires_working_socketr
r$r-r1r�r:rDrFrMrUr\r`r3rjrlrxrzr}rr�r�r�r�r�r��TestCaser�r0r>r<rJrTr|r�r�r�r�r�r�mainr"rr�<module>rs~������������#�#�#�#�#�#�
�
�
�
�����	�	�	�	�����������&�&�&�&�&�&����t�,�,�,�,�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(����
�
�
������
�
�
�'�'�'���
�
�
�'�'�'������'�'�'���
�
�
�
(�(�(������	%�	%�	%���
�
�
�'�'�'�
��
�
�
�
�
�
���������
�
�
�
$�
$�
$�
��/�/�/�$�$�$�,�_������
�
�
�,�,�,���
�
�
�)�)�)���
�
�
�+�+�+���"
�
�
�+�+�+���������	-�	-�	-�)�+�6��;�
<�)�-�8�9�����������0p1�p1�p1�p1�p1�H�%�p1�p1�p1�f'����	/�	/�	/�	/�	/�-�	/�	/�	/�	��0�0�0�0�0�=�0�0���0�Y#�Y#�Y#�Y#�Y#�x�0�Y#�Y#�Y#�@#�#�#�#�#�#�#�#�L+�+�+�H�H�H�d�d�d�d�d�8�$�d�d�d�N'I�'I�'I�'I�'I�x�(�'I�'I�'I�T#%�#%�#%�#%�#%�H�%�#%�#%�#%�L�z����H�M�O�O�O�O�O��r