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

Function test_growing_display_file_console

tests/test_live.py:146–158  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

144
145
146def test_growing_display_file_console() -> None:
147 console = create_capture_console(force_terminal=False)
148 console.begin_capture()
149 with Live(console=console, auto_refresh=False) as live:
150 display = ""
151 for step in range(10):
152 display += f"Step {step}\n"
153 live.update(display, refresh=True)
154 output = console.end_capture()
155 assert (
156 output
157 == "Step 0\nStep 1\nStep 2\nStep 3\nStep 4\nStep 5\nStep 6\nStep 7\nStep 8\nStep 9\n"
158 )
159
160
161def test_live_screen() -> None:

Callers

nothing calls this directly

Calls 5

LiveClass · 0.90
create_capture_consoleFunction · 0.85
begin_captureMethod · 0.80
end_captureMethod · 0.80
updateMethod · 0.45

Tested by

no test coverage detected