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

Function test_create_tools_table_basic

tests/display/test_formatting.py:53–67  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

51
52
53def test_create_tools_table_basic():
54 ti = ToolInfo(name="foo", namespace="srv", description="d", parameters=None)
55 table: Table = create_tools_table([ti], show_details=False)
56 # table title lists count
57 assert table.title == "1 Available Tools"
58 # columns should be Server, Tool, Description
59 assert [c.header for c in table.columns] == ["Server", "Tool", "Description"]
60 # exactly one data row
61 rows = list(table.rows)
62 assert len(rows) == 1
63 # Test that the table structure is correct and can be used
64 assert hasattr(table, "columns")
65 assert hasattr(table, "rows")
66 # Verify we can access basic properties without Rich
67 assert len(list(table.rows)) == 1
68
69
70def test_create_tools_table_with_details():

Callers

nothing calls this directly

Calls 2

ToolInfoClass · 0.90
create_tools_tableFunction · 0.90

Tested by

no test coverage detected