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

Function test_console_width

tests/test_panel.py:45–50  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

43
44
45def test_console_width() -> None:
46 console = Console(file=io.StringIO(), width=50, legacy_windows=False)
47 panel = Panel("Hello, World", expand=False)
48 min_width, max_width = panel.__rich_measure__(console, console.options)
49 assert min_width == 16
50 assert max_width == 16
51
52
53def test_fixed_width() -> 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