Skip to content

Commit a77bc41

Browse files
authored
Refactor path addition to sys.path in conftest.py
CI: package install + path safety; use Python 3.11
1 parent 383eae0 commit a77bc41

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

tests/conftest.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import sys
22
from pathlib import Path
3-
4-
# Add the repo root to sys.path so "import risk_engine" works in CI
53
ROOT = Path(__file__).resolve().parents[1]
6-
if str(ROOT) not in sys.path:
7-
sys.path.insert(0, str(ROOT))
4+
p = str(ROOT)
5+
if p not in sys.path:
6+
sys.path.insert(0, p)

0 commit comments

Comments
 (0)