Files
torbenandClaude Sonnet 5.5 8f3844d650 Add load_baseline reading an eval set from a git ref
Archive the set folder at the commit, unpack into a temp dir and read
cases and recorded responses into memory; the working tree stays untouched.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-12-04 23:16:48 +01:00

17 lines
554 B
Python

import pytest
from chemenu.evals.baseline import GIT_REPO_ENV
@pytest.fixture(autouse=True)
def _isolated_git(monkeypatch: pytest.MonkeyPatch) -> None:
"""Keep git in tests away from the repository running them.
`git rebase --exec` and hooks export GIT_DIR; without this, `git init` and
`git commit` in a test would act on the checkout itself.
"""
for name in GIT_REPO_ENV:
monkeypatch.delenv(name, raising=False)
monkeypatch.setenv("GIT_CONFIG_GLOBAL", "/dev/null")
monkeypatch.setenv("GIT_CONFIG_NOSYSTEM", "1")