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

Function test_console_width

tests/test_text.py:316–321  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

314
315
316def test_console_width():
317 console = Console()
318 text = Text("Hello World!\nfoobarbaz")
319 assert text.__rich_measure__(console, 80) == Measurement(9, 12)
320 assert Text(" " * 4).__rich_measure__(console, 80) == Measurement(4, 4)
321 assert Text(" \n \n ").__rich_measure__(console, 80) == Measurement(3, 3)
322
323
324def test_join():

Callers

nothing calls this directly

Calls 5

__rich_measure__Method · 0.95
ConsoleClass · 0.90
TextClass · 0.90
MeasurementClass · 0.90
__rich_measure__Method · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…