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:
yoff
2020-11-06 15:03:20 +01:00
committed by GitHub
parent fe186bf854
commit 45317bcec9

View File

@@ -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"