Loop exits on '__stop__' message.
(self)
| 41 | class TestRunAgentLoop: |
| 42 | @pytest.mark.asyncio |
| 43 | async def test_exit_on_stop_signal(self): |
| 44 | """Loop exits on '__stop__' message.""" |
| 45 | ctx = _make_context() |
| 46 | ui = _make_ui() |
| 47 | q: asyncio.Queue = asyncio.Queue() |
| 48 | done = asyncio.Event() |
| 49 | |
| 50 | await q.put("__stop__") |
| 51 | |
| 52 | with patch("mcp_cli.chat.conversation.ConversationProcessor"): |
| 53 | result = await run_agent_loop(ctx, ui, q, done) |
| 54 | |
| 55 | assert done.is_set() |
| 56 | assert isinstance(result, str) |
| 57 | |
| 58 | @pytest.mark.asyncio |
| 59 | async def test_exit_on_quit(self): |
nothing calls this directly
no test coverage detected