diff --git a/src/conftest.py b/src/conftest.py deleted file mode 100644 index a88c512..0000000 --- a/src/conftest.py +++ /dev/null @@ -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__))) \ No newline at end of file diff --git a/src/tests/conftest.py b/src/tests/conftest.py index e945f10..f826342 100644 --- a/src/tests/conftest.py +++ b/src/tests/conftest.py @@ -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 diff --git a/todo.md b/todo.md index 6ca9102..d160f8f 100644 --- a/todo.md +++ b/todo.md @@ -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,