test: isolate pytest runtime defaults across workers and runs

This commit is contained in:
Alexandre Teixeira
2026-10-03 03:46:52 +01:00
parent a52c657150
commit 6eb0bbfe70
7 changed files with 186 additions and 12 deletions
+5 -6
View File
@@ -14,21 +14,20 @@ These tests pin both halves:
web_fetching the HTML report.
"""
import json
from pathlib import Path
import pytest
from src.tool_implementations import do_manage_research
from src.agent_loop import TOOL_SECTIONS
_DATA_DIR = Path("data/deep_research")
@pytest.fixture
def saved_report():
_DATA_DIR.mkdir(parents=True, exist_ok=True)
def saved_report(tmp_path, monkeypatch):
from src.tools import research
monkeypatch.setattr(research, "DEEP_RESEARCH_DIR", str(tmp_path))
rid = "rp-testreport1363"
path = _DATA_DIR / f"{rid}.json"
path = tmp_path / f"{rid}.json"
path.write_text(json.dumps({
"query": "trending blender video ideas",
"result": "## Findings\nShort-form Geometry Nodes tutorials are trending.",