From: Irit Katriel <1055913+iritkatriel@users.noreply.github.com> Date: Tue, 1 Feb 2022 10:31:57 +0000 (+0000) Subject: bpo-44031: fix test_tabnanny failure in non-ascii CWD (GH-31014) X-Git-Tag: v3.11.0a5~39 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=108e66b6d23efd0fc2966163ead9434b328c5f17;p=thirdparty%2FPython%2Fcpython.git bpo-44031: fix test_tabnanny failure in non-ascii CWD (GH-31014) --- diff --git a/Lib/test/test_tabnanny.py b/Lib/test/test_tabnanny.py index 4dfbd2985d5b..59fdfc5573d3 100644 --- a/Lib/test/test_tabnanny.py +++ b/Lib/test/test_tabnanny.py @@ -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()