Skip to content

Convert Claude Code or Codex into the most intelligent Deep Research Agent. Collect, search, and synthesize web research into a persistent, searchable wiki that builds on itself. Hosted API + MCP: hyperresearch.ai

tests: reset the process-global render context between tests (#65)

Francois du Plessis62390a18536b
diff --git a/tests/conftest.py b/tests/conftest.py
index 505fc87..9c2b6df 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -9,6 +9,22 @@ import pytest
from hyperresearch.core.vault import Vault
[email protected](autouse=True)
+def _reset_render_state():
+ """Reset hooks' process-global render context between tests.
+
+ install_hooks() sets a module-global profile context that direct
+ _install_* calls reuse; without a reset, a test that installs with a
+ profile overlay (e.g. a haiku fetcher) poisons every later install
+ in the same process. Only bites when file order puts the overlay
+ test first, which is why the default alphabetical run never sees it.
+ """
+ from hyperresearch.core import hooks
+
+ yield
+ hooks._RENDER_STATE = None
+
+
@pytest.fixture
def tmp_vault(tmp_path: Path) -> Vault:
"""Create a temporary vault for testing."""