Files

20 lines
756 B
Python

"""
pytest's entry for ``tests/``: the harness-plugin suites (test_harness_*.py)
need an ai-agent checkout (``AI_AGENT_DIR``, default ~/projects/ai-agent) and
get their sandbox from :mod:`harness_env`; without one they are left out and
the rest (``test_public_scrub.py``) still runs.
"""
from __future__ import annotations
import os
import pathlib
_SIDECAR = pathlib.Path(os.path.expanduser(os.environ.get("AI_AGENT_DIR", "~/projects/ai-agent"))) / "sidecar"
if (_SIDECAR / "harness_loader.py").is_file():
from harness_env import * # noqa: F401,F403 — the sandbox, fixtures and helpers
from harness_env import pytest_sessionfinish # noqa: F401 — the hook, by name
else: # pragma: no cover
collect_ignore_glob = ["test_harness_*.py"]