Test generating a table but using auto-refresh from threading
()
| 114 | |
| 115 | |
| 116 | def 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 | |
| 130 | def test_growing_display_console_redirect() -> None: |
nothing calls this directly
no test coverage detected