Skip to content

Commit bd68986

Browse files
committed
Python: add test showing dict can take multiple arguments
1 parent 9357762 commit bd68986

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

python/ql/test/library-tests/dataflow/coverage/test_builtins.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,13 @@ def test_dict_from_dict():
142142
SINK(d2["k"]) #$ flow="SOURCE, l:-2 -> d2['k']"
143143
SINK_F(d2["k1"])
144144

145+
def test_dict_from_multiple_args():
146+
d = dict([("k", SOURCE), ("k1", NONSOURCE)], k2 = SOURCE, k3 = NONSOURCE)
147+
SINK(d["k"]) #$ MISSING: flow="SOURCE, l:-1 -> d['k']"
148+
SINK_F(d["k1"])
149+
SINK(d["k2"]) #$ flow="SOURCE, l:-3 -> d['k2']"
150+
SINK_F(d["k3"])
151+
145152
## Container methods
146153

147154
### List

0 commit comments

Comments
 (0)