Commit ea55cd8
committed
fix(ci): add pythonpath=["."] to pytest config
test_track_span_context.py uses 'from tests.conftest import
BASE_URL' which requires the tests/ directory to be importable as
a top-level package. On Python 3.10/3.11 (CI matrix) pytest's
rootdir discovery lands on the repo root rather than the tests/
directory, so 'tests' is not on sys.path and the import raises
ModuleNotFoundError at collection time, failing one test:
FAILED tests/test_track_span_context.py::test_module_level_track_llm_output_tokens_optional
ModuleNotFoundError: No module named 'tests'
On Python 3.14 the same code passes because pytest-asyncio /
hatchling pyproject discovery adds the repo root to sys.path.
3.10/3.11 don't get that for free.
Add 'pythonpath = ["."]' to [tool.pytest.ini_options] so all
Python versions in the supported matrix resolve 'tests' as a
top-level module.1 parent 90cbc54 commit ea55cd8
1 file changed
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
149 | 155 | | |
150 | 156 | | |
151 | 157 | | |
| |||
0 commit comments