(self, mock_opts, mock_theme, mock_restore, runner)
| 1092 | @patch("mcp_cli.main.set_theme") |
| 1093 | @patch("mcp_cli.main.process_options", return_value=_make_process_options_return()) |
| 1094 | def test_chat_timeout_error(self, mock_opts, mock_theme, mock_restore, runner): |
| 1095 | from mcp_cli.main import app |
| 1096 | |
| 1097 | def _raise_timeout(coro): |
| 1098 | coro.close() |
| 1099 | raise asyncio.TimeoutError |
| 1100 | |
| 1101 | mm = _make_model_manager() |
| 1102 | with patch("mcp_cli.model_management.ModelManager", return_value=mm): |
| 1103 | with patch("asyncio.run", side_effect=_raise_timeout): |
| 1104 | runner.invoke(app, ["chat"]) |
| 1105 | |
| 1106 | @patch("mcp_cli.main.restore_terminal") |
| 1107 | @patch("mcp_cli.main.set_theme") |
nothing calls this directly
no test coverage detected