MCPcopy
hub / github.com/Textualize/rich / test_rule_in_ratio_table

Function test_rule_in_ratio_table

tests/test_rule_in_table.py:57–76  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

55
56
57def test_rule_in_ratio_table():
58 console = Console(width=32, file=io.StringIO(), legacy_windows=False, _environ={})
59 table = Table(box=box.ASCII, expand=True, show_header=False)
60 table.add_column(ratio=1)
61 table.add_column()
62 table.add_row("COL1", "COL2")
63 table.add_row("COL1", Rule(style=None))
64 table.add_row("COL1", "COL2")
65 console.print(table)
66 expected = dedent(
67 """\
68 +------------------------------+
69 | COL1 | COL2 |
70 | COL1 | ──── |
71 | COL1 | COL2 |
72 +------------------------------+
73 """
74 )
75 result = console.file.getvalue()
76 assert result == expected

Callers

nothing calls this directly

Calls 6

add_columnMethod · 0.95
add_rowMethod · 0.95
printMethod · 0.95
ConsoleClass · 0.90
TableClass · 0.90
RuleClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…