bpo-44031: fix test_tabnanny failure in non-ascii CWD (GH-31014)

This commit is contained in:
Irit Katriel 2022-02-01 10:31:57 +00:00 committed by GitHub
parent a4cb31927a
commit 108e66b6d2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -293,8 +293,8 @@ class TestCommandLine(TestCase):
_, out, err = script_helper.assert_python_ok('-m', 'tabnanny', *args)
# Note: The `splitlines()` will solve the problem of CRLF(\r) added
# by OS Windows.
out = out.decode('ascii')
err = err.decode('ascii')
out = os.fsdecode(out)
err = os.fsdecode(err)
if partial:
for std, output in ((stdout, out), (stderr, err)):
_output = output.splitlines()