summaryrefslogtreecommitdiff
path: root/services/strategy-engine/tests/conftest.py
blob: 2b909ef84fc8e696437d3e1fbde5ae72460ddc5d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
"""Pytest configuration: ensure strategies/ is importable."""

import sys
from pathlib import Path

# Add the strategies directory to sys.path so that `from strategies.base import ...` works
STRATEGIES_DIR = Path(__file__).parent.parent / "strategies"
if str(STRATEGIES_DIR) not in sys.path:
    sys.path.insert(0, str(STRATEGIES_DIR.parent))

# Ensure the worktree's strategy_engine src is preferred over any installed version
WORKTREE_SRC = Path(__file__).parent.parent / "src"
if str(WORKTREE_SRC) not in sys.path:
    sys.path.insert(0, str(WORKTREE_SRC))