build(pytest): use importlib import mode to fix app test collection
Tests / Test tests.test_workspace_packaging.test_workspace_distributions_own_expected_import_packages failed
Tests / Test tests.test_workspace_packaging.test_workspace_distributions_own_expected_import_packages failed
apps/cloud-api/tests and apps/device-host-agent/tests both contain test_app.py without __init__.py, so pytest's default prepend mode collided on the bare module name and aborted collection when Jenkins passed both paths together. Switching to importlib imports each file by its full path and avoids the collision. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -54,7 +54,7 @@ include = [
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
testpaths = ["tests"]
|
||||
addopts = "-ra"
|
||||
addopts = "-ra --import-mode=importlib"
|
||||
markers = [
|
||||
"integration: tests requiring external hardware or services",
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user