Skip to content

test_rich_console_ex Test fail: duplicate values #58

Closed as not planned
Closed as not planned
@sebix

Description

@sebix

On openSUSE Tumbleweed we are currently experiencing this test fail:

[  115s] =================================== FAILURES ===================================
[  115s] _____________________________ test_rich_console_ex _____________________________
[  115s] 
[  115s]     def test_rich_console_ex() -> None:
[  115s]         """Validate that ConsoleEx can capture output from print() calls."""
[  115s]         console = Console(record=True, redirect=True)
[  115s]         console.print("alpha")
[  115s]         print("beta")
[  115s]         sys.stdout.write("gamma\n")
[  115s]         sys.stderr.write("delta\n")
[  115s]         # While not supposed to happen we want to be sure that this will not raise
[  115s]         # an exception. Some libraries may still sometimes send bytes to the
[  115s]         # streams, notable example being click.
[  115s]         # sys.stdout.write(b"epsilon\n")  # type: ignore
[  115s]         proc = run("echo 123")
[  115s]         assert proc.stdout == "123\n"
[  115s]         text = console.export_text()
[  115s] >       assert text == "alpha\nbeta\ngamma\ndelta\n123\n"
[  115s] E       AssertionError: assert 'alpha\nbeta\...a\n123\n123\n' == 'alpha\nbeta\...ndelta\n123\n'
[  115s] E           alpha
[  115s] E           beta
[  115s] E         + beta
[  115s] E         + gamma
[  115s] E           gamma
[  115s] E           delta
[  115s] E         + delta...
[  115s] E         
[  115s] E         ...Full output truncated (3 lines hidden), use '-vv' to show
[  115s] 
[  115s] src/subprocess_tee/test/test_rich.py:23: AssertionError
[  115s] ----------------------------- Captured stdout call -----------------------------
[  115s] alpha
[  115s] beta
[  115s] gamma
[  115s] delta
[  115s] 123

Complete log (which also includes versions of all installed libraries):
log.txt

Do you know what the issue might be?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions