Skip to content

Commit 6f5b949

Browse files
committed
Python: adjust test expectations
note that we do retain precision in `test_dict_from_keyword()`
1 parent a4c1a62 commit 6f5b949

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

python/ql/lib/semmle/python/frameworks/Stdlib.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4271,7 +4271,7 @@ module StdlibPrivate {
42714271
preservesValue = true
42724272
)
42734273
or
4274-
// Imprecise content in any argument ends up on the container itself.
4274+
// Imprecise content in the first argument ends up on the container itself.
42754275
input = "Argument[0]" and
42764276
output = "ReturnValue" and
42774277
preservesValue = false

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,10 @@ def test_dict_from_dict():
145145
@expects(4)
146146
def test_dict_from_multiple_args():
147147
d = dict([("k", SOURCE), ("k1", NONSOURCE)], k2 = SOURCE, k3 = NONSOURCE)
148-
SINK(d["k"]) #$ MISSING: flow="SOURCE, l:-1 -> d['k']"
149-
SINK_F(d["k1"])
148+
SINK(d["k"]) #$ flow="SOURCE, l:-1 -> d['k']"
149+
SINK_F(d["k1"]) #$ SPURIOUS: flow="SOURCE, l:-2 -> d['k1']" // due to imprecise list content
150150
SINK(d["k2"]) #$ flow="SOURCE, l:-3 -> d['k2']"
151-
SINK_F(d["k3"])
151+
SINK_F(d["k3"]) #$ SPURIOUS: flow="SOURCE, l:-4 -> d['k3']" // due to imprecise list content
152152

153153
## Container methods
154154

0 commit comments

Comments
 (0)