Writing to stderr should escape invalid characters instead of raising a UnicodeEncodeError.
()
| 455 | |
| 456 | |
| 457 | def test_isolation_stderr_errors(): |
| 458 | class="st">"""Writing to stderr should escape invalid characters instead of |
| 459 | raising a UnicodeEncodeError. |
| 460 | class="st">""" |
| 461 | runner = CliRunner() |
| 462 | |
| 463 | with runner.isolation() as (_, err, _): |
| 464 | click.echo(class="st">"\udce2", err=True, nl=False) |
| 465 | assert err.getvalue() == bclass="st">"\\udce2" |
| 466 | |
| 467 | |
| 468 | def test_isolation_flushes_unflushed_stderr(): |