Skip to content
Myr

Restore `test_echo_color_flag` from #3505 that was lost in #3674 merge

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Kevin Deldycke · committed by Kevin Deldycke · parent 7925a34 · Browse files · 1 file+6 added−10 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+6 added−10 removed

  • tests:+6 added−10 removed

1 file+6 added−10 removed

modified:tests/test_utils/test_echo.py+6 added-10 removed
72 unmodified lines
73 click.echo(styled_text, color=True)74 out, err = capfd.readouterr()75 assert out == f"{styled_text}\n"7677 isatty = True77 click.echo(styled_text)78 out, err = capfd.readouterr()79 assert out == f"{styled_text}\n"8081 isatty = False83 # Faking isatty() is not enough on Windows;84 # the implementation caches the colorama wrapped stream85 # so we have to use a new stream for each test86 stream = StringIO()87 click.echo(styled_text, file=stream)88 assert stream.getvalue() == f"{text}\n"82 click.echo(styled_text)83 out, err = capfd.readouterr()84 assert out == f"{text}\n"8590 stream = StringIO()91 click.echo(styled_text, file=stream, color=True)92 assert stream.getvalue() == f"{styled_text}\n"86 click.echo(styled_text, color=True)87 out, err = capfd.readouterr()88 assert out == f"{styled_text}\n"899091@pytest.mark.skipif(WIN, reason="Test too complex to make work windows.")92def test_echo_writing_to_standard_error(capfd, monkeypatch):
80 unmodified lines