Files
codeql/python/ql/test/library-tests/ApiGraphs/py3/ModuleImportWithDots.ql
Rasmus Wriedt Larsen 597a8414d9 Python: Add test of API::moduleImport with dots
This is currently semi-works -- the import is allowed, but doesn't
always work when used :|
2022-05-12 13:29:16 +02:00

19 lines
449 B
Plaintext

private import python
private import semmle.python.ApiGraphs
query API::Node moduleImportWithDots() { result = API::moduleImport("a.b.c.d") }
query API::CallNode doesntFullyWork() {
result = API::moduleImport("a.b.c.d").getMember("method").getACall()
}
query API::CallNode works() {
result =
API::moduleImport("a")
.getMember("b")
.getMember("c")
.getMember("d")
.getMember("method")
.getACall()
}