python (3.12.0)

(root)/
lib/
python3.12/
test/
__pycache__/
test_lltrace.cpython-312.opt-1.pyc

ΑeddlZddlZddlZddlmZddlmZddlmZdZ	ejejdGddejZ
ed	k(rejyy)
N)support)	os_helper)assert_python_okcjg}tdD]}|j|d}d}t||y)Nrzthis isz
an example)rangeappendprint)xiys   E/BuggyBox/python/3.12.0/bootstrap/lib/python3.12/test/test_lltrace.pyexampler	s8
A
1X	AA	!QKzlltrace requires Py_DEBUGc$eZdZdZdZdZdZy)TestLLTracec\tj|j}ttj
dd5}|j
tjtj
|j|dddttj
\}}}|j|d|j|d|jd}tjr6tdt|tdt|t|S#1swYxYw)Nwzutf-8)encodingrrz

--- code ---z
--- stdout ---)textwrapdedentstripopenrTESTFN
addCleanupunlinkwriterassertEqualdecoderverboser	)selfcodefdstatusstdoutstderrresults       r
run_codezTestLLTrace.run_codest$**,
)""C'
:	bOOI,,i.>.>?HHTN	"2)2B2B!C%#w'??$%$K$%&MG
		s
AD""D+cj|jd}|jd||jd||jd||jd||jd||jd||jd||jd	||jd
|y)Na
            def dont_trace_1():
                a = "a"
                a = 10 * a
            def trace_me():
                for i in range(3):
                    +i
            def dont_trace_2():
                x = 42
                y = -x
            dont_trace_1()
            __lltrace__ = 1
            trace_me()
            del __lltrace__
            dont_trace_2()
        GET_ITERFOR_ITERCALL_INTRINSIC_1POP_TOP	BINARY_OPUNARY_NEGATIVEz'trace_me' in module '__main__'dont_trace_1z'dont_trace_2' in module)r'assertInassertNotInr r$s  r
test_lltracezTestLLTrace.test_lltrace&s 
 	


j&)

j&)

(&1

i(f-)62

7@03V<rc||jd}|jd||jd||jd||jd|tjtdDcic]}|j
|}}|j
D]}|jd\}}}|st|}|j}t|d	k(r|\}}	t|	}	n|\}d}	|j||j||j||j|	ycc}w)
Nz
            from test import test_lltrace
            test_lltrace.__lltrace__ = 1
            test_lltrace.example()
        z''example' in module 'test.test_lltrace'
LOAD_CONSTr*zthis is an exampleT)adaptive:)r'r0disget_instructionsroffset
splitlines	partitionintsplitlenropnamearg)
r r$r	instr_mapliner;colonopname_opargrAopargs
          r
test_lltrace_different_modulez)TestLLTrace.test_lltrace_different_moduleBs- 

	


?H

lF+

j&)

*F3+.*>*>wQU*VWQQXXq[W	W%%'
	;D*...*='FE<[F'--/L< A% ,
E
(	Yv.55v>Yv.22E:
	;Xs7D9cJ|jd}|jd|y)Nz
            import code

            console = code.InteractiveConsole()
            console.push('__lltrace__ = 1')
            console.push('a = [1, 2, 3]')
            console.push('a[0] = 1')
            print('unreachable if bug exists')
        zunreachable if bug exists)r'r0r2s  r
1test_lltrace_does_not_crash_on_subscript_operatorz=TestLLTrace.test_lltrace_does_not_crash_on_subscript_operator^s(
 
	


16:rN)__name__
__module____qualname__r'r3rHrJrr
rrs"=8;8;rr__main__)r9runittesttestrtest.supportrtest.support.script_helperrr
skipUnlessPy_DEBUGTestCaserrKmainrNrr
<module>rXsr
"7W%%'BCY;(##Y;DY;vzHMMOr