Open Chedi opened 2 years ago
A PR would have being quite useful here.
This is caused by https://github.com/Textualize/rich/issues/2172 and we will need to update the code to address this.
This is caused by Textualize/rich#2172 and we will need to update the code to address this.
Just opened an upstream PR, fyi.
The following test (test_rich_console_ex) fails with:
======================================================================== src/enrich/test/test_console.py::test_rich_console_ex
____ test_rich_consoleex ____
def test_rich_console_ex() -> None: """Validate that ConsoleEx can capture output from print() calls.""" console = Console(record=True, redirect=True) console.print("alpha") print("beta") sys.stdout.write("gamma\n") sys.stderr.write("delta\n")
While not supposed to happen we want to be sure that this will not raise
E AssertionError: assert 'alpha\nbeta...elta\ndelta\n' == 'alpha\nbeta\ngamma\ndelta\n' E alpha E beta E + beta E + gamma E gamma E delta E + delta
src/enrich/test/test_console.py:23: AssertionError ----------------------------- Captured stdout call ----------------------------- alpha beta gamma delta
========================================================================