Files
wehub-resource-sync a2cb1f9821
Wiki / validate (push) Has been cancelled
Deploy Wiki / Deploy to Cloudflare Pages (push) Has been cancelled
CI / test (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 13:03:55 +08:00

23 lines
597 B
Python

"""Shared fixtures and sys.path setup for all tests."""
from __future__ import annotations
import sys
from pathlib import Path
import pytest
# Ensure agent/ is on sys.path so imports like `backtest.*` and `src.*` work.
AGENT_DIR = Path(__file__).resolve().parent.parent
if str(AGENT_DIR) not in sys.path:
sys.path.insert(0, str(AGENT_DIR))
@pytest.fixture(autouse=True)
def _reset_env_config():
"""Clear the cached EnvConfig before each test so monkeypatch.setenv works."""
from src.config.accessor import reset_env_config
reset_env_config()
yield
reset_env_config()