from tests.conftest import ... levait ModuleNotFoundError en CI : le binaire pytest n'ajoute pas le répertoire courant à sys.path, contrairement à python -m pytest (utilisé en local, qui masquait le problème). Correctifs : tests/__init__.py (package), pythonpath=[.] dans la config pytest, et étape CI en python -m pytest. Vérifié : 36/36 dans les trois modes d'invocation.
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
"""Kanbante test suite.
|
||||
|
||||
This package marker matters: with it, pytest puts the repository root on
|
||||
sys.path, so `from tests.conftest import ...` resolves identically
|
||||
whether the suite is launched via the `pytest` binary (CI) or via
|
||||
`python -m pytest` (which additionally adds the CWD). The root is also
|
||||
pinned explicitly through `pythonpath` in pyproject.toml.
|
||||
"""
|
||||
Reference in New Issue
Block a user