refactor: consolidate conftest into src/tests/conftest.py
Remove the redundant src/conftest.py sys.path bootstrap and move it into src/tests/conftest.py; run_tests.py already sets PYTHONPATH and the tests package layout puts src/ on sys.path. Verified via run_tests.py (619/619), direct pytest without PYTHONPATH, and run_sanity.py (all checks green). Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
@@ -1,6 +0,0 @@
|
||||
# conftest.py - Pytest configuration
|
||||
import os
|
||||
import sys
|
||||
|
||||
# Add the current directory to the Python path
|
||||
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
|
||||
@@ -1,8 +1,12 @@
|
||||
"""Pytest fixtures for librarian and mdoctor tests."""
|
||||
|
||||
import os
|
||||
import sys
|
||||
import tempfile
|
||||
|
||||
# Add the src directory to the Python path so the tool packages resolve
|
||||
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
|
||||
import pytest
|
||||
|
||||
from librarian.librarian import Librarian
|
||||
|
||||
@@ -61,7 +61,13 @@ block a correct install or make the docs contradict the code.
|
||||
`pyproject.toml` comments or SPEC
|
||||
- [ ] Remove `src/llm-wiki/utils/scripts/example.py` — `wiki init`
|
||||
skips `.py` files, so it can never reach user wikis
|
||||
- [ ] Deduplicate conftest: `src/conftest.py` vs `src/tests/conftest.py`
|
||||
- [x] Deduplicate conftest: `src/conftest.py` vs `src/tests/conftest.py`
|
||||
- [x] Consolidated into `src/tests/conftest.py` (sys.path bootstrap
|
||||
moved there, outer file removed, 2026-09-27); verified
|
||||
`python src/run_tests.py` (619/619), `python -m pytest` without
|
||||
PYTHONPATH, and `python src/run_sanity.py` all pass — the
|
||||
`6055ac6` revert was a misdiagnosis: the then-failing sanity was
|
||||
the terminal-width issue below, not the conftest change
|
||||
- [x] `run_sanity.py` run fails, need fixing
|
||||
- [x] run sanity should show what exactly to fix
|
||||
- [x] pytests should show which test are failing,
|
||||
|
||||
Reference in New Issue
Block a user