(self, mock_opts, mock_theme, mock_restore, runner)
| 1077 | @patch("mcp_cli.main.set_theme") |
| 1078 | @patch("mcp_cli.main.process_options", return_value=_make_process_options_return()) |
| 1079 | def test_chat_keyboard_interrupt(self, mock_opts, mock_theme, mock_restore, runner): |
| 1080 | from mcp_cli.main import app |
| 1081 | |
| 1082 | def _raise_keyboard(coro): |
| 1083 | coro.close() |
| 1084 | raise KeyboardInterrupt |
| 1085 | |
| 1086 | mm = _make_model_manager() |
| 1087 | with patch("mcp_cli.model_management.ModelManager", return_value=mm): |
| 1088 | with patch("asyncio.run", side_effect=_raise_keyboard): |
| 1089 | runner.invoke(app, ["chat"]) |
| 1090 | |
| 1091 | @patch("mcp_cli.main.restore_terminal") |
| 1092 | @patch("mcp_cli.main.set_theme") |
nothing calls this directly
no test coverage detected