mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-19 17:14:43 +04:00
minor py2 cleanup for sys.stderr.buffer
This commit is contained in:
parent
bd787a9fcd
commit
f637ac8603
1 changed files with 2 additions and 2 deletions
|
|
@ -72,8 +72,8 @@ def test_basic_healthy():
|
||||||
def test_failed_setup_command_does_not_unicode_error():
|
def test_failed_setup_command_does_not_unicode_error():
|
||||||
script = (
|
script = (
|
||||||
'import sys\n'
|
'import sys\n'
|
||||||
"getattr(sys.stderr, 'buffer', sys.stderr).write(b'\\x81\\xfe')\n"
|
"sys.stderr.buffer.write(b'\\x81\\xfe')\n"
|
||||||
'exit(1)\n'
|
'raise SystemExit(1)\n'
|
||||||
)
|
)
|
||||||
|
|
||||||
# an assertion that this does not raise `UnicodeError`
|
# an assertion that this does not raise `UnicodeError`
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue