mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
Update python/ql/test/library-tests/PointsTo/new/code/w_function_values.py
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com>
This commit is contained in:
@@ -18,15 +18,19 @@ f_false = test_conditoinal_function(False)
|
||||
f_true = test_conditoinal_function(True)
|
||||
|
||||
|
||||
def foo():
|
||||
return "foo"
|
||||
|
||||
|
||||
def test_redefinition():
|
||||
def foo():
|
||||
return "foo"
|
||||
|
||||
f = foo
|
||||
|
||||
def foo():
|
||||
return "refined"
|
||||
return "foo redefined"
|
||||
|
||||
sink = f()
|
||||
return sink
|
||||
sink_foo = f()
|
||||
sink_redefined = foo()
|
||||
return sink_foo, sink_redefined
|
||||
|
||||
foo, redefined = test_redefinition()
|
||||
assert foo == "foo"
|
||||
assert redefined == "foo redefined"
|
||||
|
||||
Reference in New Issue
Block a user