Skip to content

Commit ededbe2

Browse files
Fix CI test collection: remove conflicting tests/__init__.py and add testpaths
- Remove msal-key-attestation/tests/__init__.py to prevent namespace conflict with the main tests/ package (caused all 24 existing tests to fail with 'ModuleNotFoundError: No module named tests.test_*') - Add [tool:pytest] testpaths=tests to setup.cfg so bare 'pytest' only collects the main test suite - Fix remaining CodeQL alert: avoid printing result dict data on failure Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 2a7c4f6 commit ededbe2

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

msal-key-attestation/tests/__init__.py

Whitespace-only changes.

sample/msi_v2_sample.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,7 @@ def main():
7979
)
8080

8181
if "access_token" not in result:
82-
print("ERROR: Token acquisition failed:",
83-
result.get("error", "unknown"), "-",
84-
result.get("error_description", "no description"))
82+
print("ERROR: Token acquisition failed. Check logs for details.")
8583
sys.exit(1)
8684

8785
token_type = result.get("token_type", "unknown")

setup.cfg

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,6 @@ broker =
7272
[options.packages.find]
7373
exclude =
7474
tests
75+
76+
[tool:pytest]
77+
testpaths = tests

0 commit comments

Comments
 (0)