Files
codeql/python/ql/test/experimental/library-tests/CallGraph/code/simple.py
Rasmus Wriedt Larsen 6d9745e5c3 Python: Rewrite call-graph tests to be inline expectation (2/2)
I ported the predicates showing difference between points-to and
type-tracking, since it's helpful to see the list of differences,
instead of having to parse expectations!
2022-11-11 10:34:28 +01:00

21 lines
272 B
Python

def foo():
print("foo called")
indirect_foo = foo
def bar():
print("bar called")
lam = lambda: print("lambda called")
foo() # $ pt=foo
indirect_foo() # $ pt=foo
bar() # $ pt=bar
lam() # $ pt=lambda[simple.py:12:7]
# python -m trace --trackcalls simple.py