]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-44031: fix test_tabnanny failure in non-ascii CWD (GH-31014)
authorIrit Katriel <1055913+iritkatriel@users.noreply.github.com>
Tue, 1 Feb 2022 10:31:57 +0000 (10:31 +0000)
committerGitHub <noreply@github.com>
Tue, 1 Feb 2022 10:31:57 +0000 (10:31 +0000)
Lib/test/test_tabnanny.py

index 4dfbd2985d5b5a82c7ac614c77c91be4035c9bb4..59fdfc5573d373893d7739b9d6691e736ee38c40 100644 (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()