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

Function test_fixed_width

tests/test_panel.py:53–58  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

51
52
53def test_fixed_width() -> None:
54 console = Console(file=io.StringIO(), width=50, legacy_windows=False)
55 panel = Panel("Hello World", width=20)
56 min_width, max_width = panel.__rich_measure__(console, console.options)
57 assert min_width == 20
58 assert max_width == 20
59
60
61def test_render_size() -> None:

Callers

nothing calls this directly

Calls 3

__rich_measure__Method · 0.95
ConsoleClass · 0.90
PanelClass · 0.90

Tested by

no test coverage detected