python (3.12.0)
Αe d dl Z d dlZd dlZd dlmZ d dlmZ d dlmZ d Z ej ej d G d dej Z
ed k( r ej yy)
N)support) os_helper)assert_python_okc j g } t d D ] }| j | d} d}t | | y )Nr zthis isz
an example)rangeappendprint)xiys E/BuggyBox/python/3.12.0/bootstrap/lib/python3.12/test/test_lltrace.pyexampler s8
A
1X AA !QK zlltrace requires Py_DEBUGc $ e Zd Zd Zd Zd Zd Zy)TestLLTracec \ t j | j }t t j
dd 5 }| j
t j t j
|j | d d d t t j
\ }}}| j |d | j |d |j d }t j r6t d t | t d t | t |S # 1 sw Y xY w)Nwzutf-8)encodingr r z
--- code ---z
--- stdout ---)textwrapdedentstripopenr TESTFN
addCleanupunlinkwriter assertEqualdecoder verboser )selfcodefdstatusstdoutstderrresults r
run_codezTestLLTrace.run_code s t$**,
)""C'
: bOOI,,i.>.>?HHTN "2)2B2B!C%#w'??$%$K$%&MG
s
A D""D+c j | j d }| j d| | j d| | j d| | j d| | j d| | j d| | j d| | j d | | j d
| 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'