Skip to content

Commit 3b5954e

Browse files
committed
Fix CI test import path resolution
Add a tests conftest bootstrap to include the project root in sys.path so pytest can import api and models modules reliably in GitHub Actions.
1 parent d79b43b commit 3b5954e

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

tests/conftest.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import sys
2+
from pathlib import Path
3+
4+
5+
PROJECT_ROOT = Path(__file__).resolve().parents[1]
6+
if str(PROJECT_ROOT) not in sys.path:
7+
sys.path.insert(0, str(PROJECT_ROOT))

0 commit comments

Comments
 (0)