cernenv-trainer / tests /conftest.py
anugrahhu's picture
Update CERNenv Space
0a6c641 verified
raw
history blame contribute delete
413 Bytes
"""Pytest configuration: ensure repo root is on sys.path so ``models``,
``server.*`` etc. import correctly when tests are launched as
``pytest tests/`` from the repo root or from any subfolder.
"""
from __future__ import annotations
import sys
from pathlib import Path
_REPO_ROOT = Path(__file__).resolve().parent.parent
if str(_REPO_ROOT) not in sys.path:
sys.path.insert(0, str(_REPO_ROOT))