Skip to content
Myr

TST: adjust tests

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

authored by Clément Robert · committed by Clément Robert · parent e37cad2 · Browse files · 1 file+2 added−4 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+2 added−4 removed

  • tests:+2 added−4 removed

1 file+2 added−4 removed

modified:tests/test_testing.py+2 added-4 removed
446 unmodified lines
447 runner = CliRunner()448449 with runner.isolation() as (_, err, _):450 click.echo("\udce2", err=True, nl=False)451 assert err.getvalue() == b"\\udce2"452452 assert err.getvalue() == b"\\udce2"453454454def test_isolation_flushes_unflushed_stderr():455 """An un-flushed write to stderr, as with `print(..., file=sys.stderr)`, will end up456 flushed by the runner at end of invocation.457 """458 runner = CliRunner()459460 with runner.isolation() as (_, err, _):461 click.echo("\udce2", err=True, nl=False)462 assert err.getvalue() == b"\\udce2"463464 assert err.getvalue() == b"\\udce2"465464 @click.command()465 def cli():466 # set end="", flush=False so that it's totally clear that we won't get any467 # auto-flush behaviors
4 unmodified lines