hospital-ed / tests /conftest.py
testingaccc's picture
Upload folder using huggingface_hub
0fe00d1 verified
Raw
History Blame Contribute Delete
403 Bytes
"""Shared pytest fixtures / path setup.
Adds the project root to ``sys.path`` so tests can be run from any
working directory (including ``pytest`` invoked directly in the
``tests/`` folder).
"""
from __future__ import annotations
import sys
from pathlib import Path
PROJECT_ROOT = Path(__file__).resolve().parent.parent
if str(PROJECT_ROOT) not in sys.path:
sys.path.insert(0, str(PROJECT_ROOT))