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

Function test_min_width

tests/test_table.py:128–140  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

126
127
128def test_min_width():
129 table = Table("foo", min_width=30)
130 table.add_row("bar")
131 console = Console()
132 assert table.__rich_measure__(
133 console, console.options.update_width(100)
134 ) == Measurement(30, 30)
135 console = Console(color_system=None)
136 console.begin_capture()
137 console.print(table)
138 output = console.end_capture()
139 print(output)
140 assert all(len(line) == 30 for line in output.splitlines())
141
142
143def test_no_columns():

Callers

nothing calls this directly

Calls 10

add_rowMethod · 0.95
__rich_measure__Method · 0.95
begin_captureMethod · 0.95
printMethod · 0.95
end_captureMethod · 0.95
TableClass · 0.90
ConsoleClass · 0.90
MeasurementClass · 0.90
update_widthMethod · 0.80
printFunction · 0.50

Tested by

no test coverage detected