MCPcopy
hub / github.com/MinishLab/semble / test_tool_output

Function test_tool_output

tests/test_mcp.py:332–344  ·  view source on GitHub ↗

Search and find_related format results (or an empty-state message) through the server.

(
    cache: _IndexCache,
    tool: str,
    args: dict[str, Any],
    method: str,
    results: list[SearchResult],
    chunks: list[Chunk] | None,
    expected_substrings: list[str],
)

Source from the content-addressed store, hash-verified

330 ],
331)
332async def test_tool_output(
333 cache: _IndexCache,
334 tool: str,
335 args: dict[str, Any],
336 method: str,
337 results: list[SearchResult],
338 chunks: list[Chunk] | None,
339 expected_substrings: list[str],
340) -> None:
341 """Search and find_related format results (or an empty-state message) through the server."""
342 text = await _call_tool(cache, tool, args, index_method=method, index_return=results, index_chunks=chunks)
343 for substring in expected_substrings:
344 assert substring in text
345
346
347@pytest.mark.anyio

Callers

nothing calls this directly

Calls 1

_call_toolFunction · 0.85

Tested by

no test coverage detected