21 lines
573 B
Python
21 lines
573 B
Python
"""Hermetic runtime-path fixtures shared by repository tests."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from pathlib import Path
|
|
|
|
import pytest
|
|
|
|
|
|
@pytest.fixture(autouse=True)
|
|
def isolate_coordinator_gitea_token(
|
|
request: pytest.FixtureRequest,
|
|
monkeypatch: pytest.MonkeyPatch,
|
|
tmp_path: Path,
|
|
) -> None:
|
|
"""Prevent coordinator tests from observing the mounted production token."""
|
|
if request.node.path.name == "test_hermes_coordinator.py":
|
|
monkeypatch.setenv(
|
|
"HERMES_GITEA_TOKEN_FILE", str(tmp_path / "absent-gitea-token")
|
|
)
|