"""Test bootstrap shared by every file under tests/. - Adds the project root to `sys.path` so `import agent` works when pytest is invoked from the repo root. - Provides a dummy `ANTHROPIC_API_KEY` and `SESSION_SECRET` so that pydantic settings can import without a real .env being present in CI. """ from __future__ import annotations import os 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)) os.environ.setdefault("ANTHROPIC_API_KEY", "test-key-not-used") os.environ.setdefault("SESSION_SECRET", "test-session-secret-not-used")