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

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:
2026-07-13 15:24:13 +08:00
co-authored by Claude Opus 4.6
parent 8507a5a508
commit e5ea32a44a
+1 -1
View File
@@ -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",
]