mirror of
https://github.com/github/codeql.git
synced 2026-04-27 01:35:13 +02:00
Python: adjust test expectations
note that we do retain precision in `test_dict_from_keyword()`
This commit is contained in:
@@ -4271,7 +4271,7 @@ module StdlibPrivate {
|
||||
preservesValue = true
|
||||
)
|
||||
or
|
||||
// Imprecise content in any argument ends up on the container itself.
|
||||
// Imprecise content in the first argument ends up on the container itself.
|
||||
input = "Argument[0]" and
|
||||
output = "ReturnValue" and
|
||||
preservesValue = false
|
||||
|
||||
@@ -145,10 +145,10 @@ def test_dict_from_dict():
|
||||
@expects(4)
|
||||
def test_dict_from_multiple_args():
|
||||
d = dict([("k", SOURCE), ("k1", NONSOURCE)], k2 = SOURCE, k3 = NONSOURCE)
|
||||
SINK(d["k"]) #$ MISSING: flow="SOURCE, l:-1 -> d['k']"
|
||||
SINK_F(d["k1"])
|
||||
SINK(d["k"]) #$ flow="SOURCE, l:-1 -> d['k']"
|
||||
SINK_F(d["k1"]) #$ SPURIOUS: flow="SOURCE, l:-2 -> d['k1']" // due to imprecise list content
|
||||
SINK(d["k2"]) #$ flow="SOURCE, l:-3 -> d['k2']"
|
||||
SINK_F(d["k3"])
|
||||
SINK_F(d["k3"]) #$ SPURIOUS: flow="SOURCE, l:-4 -> d['k3']" // due to imprecise list content
|
||||
|
||||
## Container methods
|
||||
|
||||
|
||||
Reference in New Issue
Block a user