mirror of
https://github.com/github/codeql.git
synced 2026-05-02 12:15:17 +02:00
Python: Add more tests for MaD sources
This commit is contained in:
@@ -117,3 +117,17 @@ testlib.foo.bar.baz.fuzzyCall(getSource()) # NOT OK
|
||||
testlib.foo().bar().fuzzyCall(getSource()) # NOT OK
|
||||
testlib.foo(lambda x: x.fuzzyCall(getSource())) # NOT OK
|
||||
otherlib.fuzzyCall(getSource()) # OK
|
||||
|
||||
# defining sources through content steps
|
||||
|
||||
# dictionaries
|
||||
testlib.source_dict["key"].func() # source
|
||||
testlib.source_dict["safe"].func() # not a source
|
||||
lambda k: testlib.source_dict_any[k].func() # source
|
||||
|
||||
# TODO: implement support for lists
|
||||
lambda i: testlib.source_list[i].func()
|
||||
|
||||
# TODO: implement support for tuples
|
||||
testlib.source_tuple[0].func() # a source
|
||||
testlib.source_tuple[1].func() # not a source
|
||||
|
||||
Reference in New Issue
Block a user