Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f637ac8

Browse files
committed
minor py2 cleanup for sys.stderr.buffer
1 parent bd787a9 commit f637ac8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/languages/helpers_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ def test_basic_healthy():
7272
def test_failed_setup_command_does_not_unicode_error():
7373
script = (
7474
'import sys\n'
75-
"getattr(sys.stderr, 'buffer', sys.stderr).write(b'\\x81\\xfe')\n"
76-
'exit(1)\n'
75+
"sys.stderr.buffer.write(b'\\x81\\xfe')\n"
76+
'raise SystemExit(1)\n'
7777
)
7878

7979
# an assertion that this does not raise `UnicodeError`

0 commit comments

Comments
 (0)