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

Function test_display_tool_call_long_string

tests/display/test_formatting.py:244–255  ·  view source on GitHub ↗

Test display of long string result (>500 chars).

(capsys)

Source from the content-addressed store, hash-verified

242
243
244def test_display_tool_call_long_string(capsys):
245 """Test display of long string result (>500 chars)."""
246 long_string = "x" * 600
247 result = ToolCallResult(
248 tool_name="test", success=True, result=long_string, error=None
249 )
250 display_tool_call_result(result, console=None)
251 captured = capsys.readouterr()
252 output_text = captured.out + captured.err
253
254 # Should show truncation message
255 assert "truncated" in output_text.lower() or "x" * 500 in output_text
256
257
258def test_display_tool_call_other_type_serializable(capsys):

Callers

nothing calls this directly

Calls 2

ToolCallResultClass · 0.90
display_tool_call_resultFunction · 0.90

Tested by

no test coverage detected