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

Method test_chat_timeout_error

tests/cli/test_main_coverage.py:1094–1104  ·  view source on GitHub ↗
(self, mock_opts, mock_theme, mock_restore, runner)

Source from the content-addressed store, hash-verified

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")

Callers

nothing calls this directly

Calls 1

_make_model_managerFunction · 0.70

Tested by

no test coverage detected