Skip to content

Commit cac5a82

Browse files
committed
Python: Fix CLI integration tests
Two issues: - Tests relying on existing query machinery (i.e. `import python`) were not resolving correctly due to a bad `qlpack.yml` file. - The diagnostics output tests needed an updated import to account for their new location.
1 parent 0550c46 commit cac5a82

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

codeql-workspace.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ provide:
66
- "*/ql/consistency-queries/qlpack.yml"
77
- "*/ql/automodel/src/qlpack.yml"
88
- "*/ql/automodel/test/qlpack.yml"
9+
- "python/extractor/qlpack.yml"
910
- "shared/**/qlpack.yml"
1011
- "cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/tainted/qlpack.yml"
1112
- "go/ql/config/legacy-support/qlpack.yml"

python/extractor/cli-integration-test/writing-diagnostics/test_diagnostics_output.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import os
22
import sys
3-
sys.path.append(os.path.join(os.path.dirname(__file__), "..", "..", "..", "integration-tests"))
3+
sys.path.append(os.path.join(os.path.dirname(__file__), "..", "..", "..", "..", "..", "integration-tests"))
44
import diagnostics_test_utils
55

66
test_db = "db"

python/extractor/qlpack.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: extractor-python
22
dependencies:
3-
codeql/python-all: "*"
4-
codeql/python-queries: "*"
3+
codeql/python-all: ${workspace}
4+
codeql/python-queries: ${workspace}
55
extractor: python
66
warnOnImplicitThis: true

0 commit comments

Comments
 (0)