diff --git a/tests/e2e/conftest.py b/tests/e2e/conftest.py index 577d0c13e2..bcfe192751 100644 --- a/tests/e2e/conftest.py +++ b/tests/e2e/conftest.py @@ -12,19 +12,16 @@ No LLM, no real platform connections. import asyncio import sys import uuid -from typing import TYPE_CHECKING from datetime import datetime, timezone from types import SimpleNamespace from unittest.mock import AsyncMock, MagicMock, patch import pytest -if TYPE_CHECKING: - from gateway.run import GatewayRunner - from gateway.config import GatewayConfig, Platform, PlatformConfig from gateway.platforms.base import SendResult from gateway.platforms.event import MessageEvent +from gateway.run import GatewayRunner from gateway.session import SessionEntry, SessionSource, build_session_key E2E_MESSAGE_SETTLE_DELAY = 0.3 @@ -169,13 +166,11 @@ def make_event( ) -def make_runner(platform: Platform, session_entry: SessionEntry = None) -> "GatewayRunner": +def make_runner(platform: Platform, session_entry: SessionEntry = None) -> GatewayRunner: """Create a GatewayRunner with mocked internals for e2e testing. Skips __init__ to avoid filesystem/network side effects. """ - from gateway.run import GatewayRunner - if session_entry is None: session_entry = make_session_entry(platform) diff --git a/tests/tools/test_mcp_elicitation.py b/tests/tools/test_mcp_elicitation.py index edc05bb4da..1177c0f5fd 100644 --- a/tests/tools/test_mcp_elicitation.py +++ b/tests/tools/test_mcp_elicitation.py @@ -250,7 +250,7 @@ class TestElicitationHandlerContextBridge: ) def test_missing_captured_context_falls_back_to_direct_call(self): - """Without a call_context (or one whose task hasn't entered a tool + """With the default call_context (or one whose task has not entered a tool call) the handler must still invoke the consent router -- just without the contextvar replay. Otherwise CLI/TUI sessions, which don't set HERMES_SESSION_PLATFORM, would break."""