Loop exits when context.exit_requested is True.
(self)
| 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): |
nothing calls this directly
no test coverage detected