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

Function test_rich_measure

tests/test_table.py:117–125  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

115
116
117def test_rich_measure():
118 console = Console()
119 assert Table("test_header", width=-1).__rich_measure__(
120 console, console.options
121 ) == Measurement(0, 0)
122 # Check __rich_measure__() for a positive width passed as an argument
123 assert Table("test_header", width=None).__rich_measure__(
124 console, console.options.update_width(10)
125 ) == Measurement(10, 10)
126
127
128def test_min_width():

Callers

nothing calls this directly

Calls 5

ConsoleClass · 0.90
TableClass · 0.90
MeasurementClass · 0.90
update_widthMethod · 0.80
__rich_measure__Method · 0.45

Tested by

no test coverage detected