feat(tests): add --preprocess-dir CLI option to pytest

- conftest.py: registra --preprocess-dir via pytest_addoption
- test_preprocessors.py: usa pytest_generate_tests per leggere i casi
  a collection time con accesso a config; _content e _fixtures_dir
  accettano path dinamico

Usage: pytest tests/test_preprocessors.py --preprocess-dir /my/folder

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Roberto Musso
2026-04-07 13:59:32 +02:00
parent dcd14220ca
commit 7fa6ad5760
2 changed files with 45 additions and 22 deletions

View File

@@ -4,6 +4,14 @@ Provides an async SQLite in-memory engine that auto-creates all tables,
a per-test session, and a FastAPI ``TestClient`` wired to use it.
"""
def pytest_addoption(parser):
parser.addoption(
"--preprocess-dir",
default=None,
help="Override fixture folder for preprocessor tests (must contain cases.yaml + data/)",
)
from __future__ import annotations
import json