failed NO_PATCH NO_PATCH UNSUBMITTED empty_patch(None) · None tool calls · 0 s · Textualize/rich
empty live Fixes https://github.com/Textualize/rich/issues/3796
| # | Tool | Arguments | Result |
|---|---|---|---|
| No trace captured. | |||
..........F
=================================== FAILURES ===================================
_______________________________ test_live_empty ________________________________
def test_live_empty() -> None:
"""Regression test for https://github.com/Textualize/rich/issues/3796
No NL should be written if there was nothing rendered.
"""
from rich.console import Group
console = create_capture_console(width=20, height=5)
console.begin_capture()
with Live(Group(), console=console, transient=True):
pass
result = console.end_capture()
print(repr(result))
> assert "\n" not in result
E AssertionError: assert '\n' not in '\x1b[?25l\r...n\x1b[?25h\r'
E
E '\n' is contained here:
E [?25l
E [2K
E ? ----
E [?25h
tests/test_live.py:186: AssertionError
----------------------------- Captured stdout call -----------------------------
'\x1b[?25l\r\x1b[2K\n\x1b[?25h\r'
!!!!!!!!!!!!!!!!!!!!!!!!!! stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!
1 failed, 10 passed in 2.25s