File size: 413 Bytes
0a6c641
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
"""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))