Skip to content

Commit 9f7edf3

Browse files
committed
Python: fix tests
The way to expose the `self` arguemnt is to call an instance method on the class, not on the instance...
1 parent 4f46ce1 commit 9f7edf3

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

python/ql/test/library-tests/dataflow/model-summaries/model_summaries.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,13 +129,13 @@ def explicit_identity(x):
129129
SINK_F(a)
130130
SINK(b) # $ flow="SOURCE, l:-2 -> b"
131131

132-
m = c.instance_method
133-
x, y = (SOURCE, NONSOURCE)
134-
SINK(x) # $ flow="SOURCE, l:-1 -> x"
132+
# call the instance method on the class to expose the self argument
133+
x, y = MS_Class.instance_method(SOURCE, NONSOURCE)
134+
SINK(x) # $ MISSING: flow="SOURCE, l:-1 -> x"
135135
SINK_F(y)
136136

137-
ms = c.explicit_self
138-
SINK(ms(SOURCE)) # $ MISSING: flow="SOURCE, l:0 -> ms(SOURCE)"
137+
# call the instance method on the class to expose the self argument
138+
SINK(MS_Class.explicit_self(SOURCE)) # $ MISSING: flow="SOURCE, l:0 -> ms(SOURCE)"
139139

140140
# Modeled flow-summary is not value preserving
141141
from json import MS_loads as json_loads

0 commit comments

Comments
 (0)