Both tools return a friendly error message when indexing fails.
(cache: _IndexCache, tool: str, args: dict[str, object])
| 269 | ], |
| 270 | ) |
| 271 | async def test_tool_index_failure(cache: _IndexCache, tool: str, args: dict[str, object]) -> None: |
| 272 | """Both tools return a friendly error message when indexing fails.""" |
| 273 | with patch("semble.mcp.SembleIndex.from_git", side_effect=RuntimeError("clone failed")): |
| 274 | server = create_server(cache) |
| 275 | result = await server.call_tool(tool, args) |
| 276 | text = _tool_text(result) |
| 277 | assert "Failed to index" in text |
| 278 | assert "clone failed" in text |
| 279 | |
| 280 | |
| 281 | @pytest.mark.anyio |
nothing calls this directly
no test coverage detected