-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_mytracer_simple.py
51 lines (41 loc) · 1.04 KB
/
test_mytracer_simple.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
if True:
def A(*args, **kwargs):
a = 5
print(
"A"
)
if a > 10: #WATCH: a
print("a > 10")
else:
print("a <= 10")
c = C() #WATCH_AFTER: c
for x in range(3):
C()
return a
def B():
def bb():
b = 10 #WATCH_AFTER: b
return "test __qualname__"
print( bb(), bb.__qualname__ )
print("start B")
x = 42 #WATCH_AFTER: x; x-10
u = (A(
x=C() ,
y=3,
z=2
)
)
print("end B")
def C():
print("C")
def generator_():
genexpr_ = (x for x in [5, 6, 7])
for a in genexpr_:
yield a #WATCH: a; a*2
listcomp_ = [ x for x in generator_() ]
lambda_ = lambda x: x*x
mapped = map(lambda_, listcomp_)
list(mapped) # to activate lazy mapping
return 2
if __name__ == "__main__":
B()