study-dashboard/tests/conftest.py

9 lines
263 B
Python

import sys
from pathlib import Path
# Ensure the src/ directory is importable when running pytest
# without installing the package first.
SRC_DIR = Path(__file__).resolve().parents[1] / "src"
if str(SRC_DIR) not in sys.path:
sys.path.insert(0, str(SRC_DIR))