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

Function test_vertical_center

tests/test_align.py:139–151  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

137
138
139def test_vertical_center():
140 console = Console(color_system=None, height=6)
141 console.begin_capture()
142 vertical_center = VerticalCenter("foo")
143 repr(vertical_center)
144 console.print(vertical_center)
145 result = console.end_capture()
146 print(repr(result))
147 expected = " \n \nfoo\n \n \n \n"
148 assert result == expected
149 assert Measurement.get(console, console.options, vertical_center) == Measurement(
150 3, 3
151 )

Callers

nothing calls this directly

Calls 8

begin_captureMethod · 0.95
printMethod · 0.95
end_captureMethod · 0.95
ConsoleClass · 0.90
VerticalCenterClass · 0.90
MeasurementClass · 0.90
printFunction · 0.50
getMethod · 0.45

Tested by

no test coverage detected