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

Function test_growing_display_autorefresh

tests/test_live.py:116–127  ·  view source on GitHub ↗

Test generating a table but using auto-refresh from threading

()

Source from the content-addressed store, hash-verified

114
115
116def test_growing_display_autorefresh() -> None:
117 """Test generating a table but using auto-refresh from threading"""
118 console = create_capture_console(height=5)
119 console.begin_capture()
120 with Live(console=console, auto_refresh=True, vertical_overflow="visible") as live:
121 display = ""
122 for step in range(10):
123 display += f"Step {step}\n"
124 live.update(display)
125 time.sleep(0.2)
126
127 # no way to truly test w/ multithreading, just make sure it doesn't crash
128
129
130def test_growing_display_console_redirect() -> None:

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected