mirror of
https://github.com/github/codeql.git
synced 2026-04-28 02:05:14 +02:00
Python: Fearlessly adding another test
in the middle of the file.
This commit is contained in:
@@ -112,7 +112,7 @@ def with_multiple_kw_args(a, b, c):
|
||||
SINK3(c)
|
||||
|
||||
|
||||
@expects(9)
|
||||
@expects(12)
|
||||
def test_multiple_kw_args():
|
||||
with_multiple_kw_args(b=arg2, c=arg3, a=arg1) #$ arg1="arg1" arg2="arg2" arg3="arg3" func=with_multiple_kw_args
|
||||
with_multiple_kw_args(arg1, *(arg2,), arg3) #$ arg1="arg1" func=with_multiple_kw_args MISSING: arg2="arg2" arg3="arg3"
|
||||
|
||||
@@ -325,9 +325,11 @@ class C:
|
||||
a = SOURCE
|
||||
|
||||
|
||||
@expects(2)
|
||||
def test_attribute_reference():
|
||||
SINK(C.a) #$ MISSING:flow="SOURCE, l:-4 -> C.a"
|
||||
|
||||
c = C()
|
||||
SINK(c.a) #$ MISSING:flow="SOURCE, l:-6 -> c.a"
|
||||
|
||||
# overriding __getattr__ should be tested by the class coverage tests
|
||||
|
||||
|
||||
Reference in New Issue
Block a user