Files
codeql/python/ql/test/experimental/library-tests/CallGraph/code/simple.py
Rasmus Wriedt Larsen 155bbbdec9 Python: Add annotated call-graph tests
See the added README for in-depth details
2020-06-24 22:15:39 +02:00

28 lines
290 B
Python

# name:foo
def foo():
print("foo called")
indirect_foo = foo
# name:bar
def bar():
print("bar called")
# name:lam
lam = lambda: print("lambda called")
# calls:foo
foo()
# calls:foo
indirect_foo()
# calls:bar
bar()
# calls:lam
lam()
# python -m trace --trackcalls simple.py