MCPcopy Create free account
hub / github.com/IBM/mcp-cli / test_exit_requested_stops_loop

Method test_exit_requested_stops_loop

tests/agents/test_loop.py:188–200  ·  view source on GitHub ↗

Loop exits when context.exit_requested is True.

(self)

Source from the content-addressed store, hash-verified

186
187 @pytest.mark.asyncio
188 async def test_exit_requested_stops_loop(self):
189 """Loop exits when context.exit_requested is True."""
190 ctx = _make_context()
191 ctx.exit_requested = True
192 ui = _make_ui()
193 q: asyncio.Queue = asyncio.Queue()
194 done = asyncio.Event()
195
196 with patch("mcp_cli.chat.conversation.ConversationProcessor"):
197 result = await run_agent_loop(ctx, ui, q, done)
198
199 assert done.is_set()
200 assert result == "Agent completed."
201
202 @pytest.mark.asyncio
203 async def test_dashboard_bridge_wired(self):

Callers

nothing calls this directly

Calls 3

run_agent_loopFunction · 0.90
_make_contextFunction · 0.70
_make_uiFunction · 0.70

Tested by

no test coverage detected