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

Method test_exit_on_quit

tests/agents/test_loop.py:59–71  ·  view source on GitHub ↗

Loop exits on 'quit' message.

(self)

Source from the content-addressed store, hash-verified

57
58 @pytest.mark.asyncio
59 async def test_exit_on_quit(self):
60 """Loop exits on 'quit' message."""
61 ctx = _make_context()
62 ui = _make_ui()
63 q: asyncio.Queue = asyncio.Queue()
64 done = asyncio.Event()
65
66 await q.put("quit")
67
68 with patch("mcp_cli.chat.conversation.ConversationProcessor"):
69 await run_agent_loop(ctx, ui, q, done)
70
71 assert done.is_set()
72
73 @pytest.mark.asyncio
74 async def test_skip_empty_and_none(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