"""Pytest configuration helpers for path setup to include src/ on sys.path.""" import sys from pathlib import Path def _ensure_src_on_syspath(): """Prepend the repository src/ path onto sys.path for import resolution.""" root = Path(__file__).resolve().parents[1] src = root / "src" src_str = str(src) # Insert at position 0 to ensure it takes precedence if src_str not in sys.path: sys.path.insert(0, src_str) _ensure_src_on_syspath()