conftest.py 313 B

1234567891011121314
  1. import sys
  2. from pathlib import Path
  3. def _ensure_src_on_syspath():
  4. root = Path(__file__).resolve().parents[1]
  5. src = root / "src"
  6. src_str = str(src)
  7. # Insert at position 0 to ensure it takes precedence
  8. if src_str not in sys.path:
  9. sys.path.insert(0, src_str)
  10. _ensure_src_on_syspath()