Skip to content

Commit 45317bc

Browse files
yoffRasmusWL
andauthored
Update python/ql/test/library-tests/PointsTo/new/code/w_function_values.py
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com>
1 parent fe186bf commit 45317bc

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

python/ql/test/library-tests/PointsTo/new/code/w_function_values.py

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,19 @@ def bar():
1818
f_true = test_conditoinal_function(True)
1919

2020

21-
def foo():
22-
return "foo"
23-
24-
2521
def test_redefinition():
22+
def foo():
23+
return "foo"
24+
2625
f = foo
2726

2827
def foo():
29-
return "refined"
30-
31-
sink = f()
32-
return sink
28+
return "foo redefined"
29+
30+
sink_foo = f()
31+
sink_redefined = foo()
32+
return sink_foo, sink_redefined
33+
34+
foo, redefined = test_redefinition()
35+
assert foo == "foo"
36+
assert redefined == "foo redefined"

0 commit comments

Comments
 (0)