Skip to content

Commit 2e9f77f

Browse files
[3.9] bpo-44031: fix test_tabnanny failure in non-ascii CWD (GH-31014) (GH-31048)
(cherry picked from commit 108e66b) Co-authored-by: Irit Katriel <[email protected]> Automerge-Triggered-By: GH:iritkatriel
1 parent 2532b7c commit 2e9f77f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lib/test/test_tabnanny.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,8 +292,8 @@ def validate_cmd(self, *args, stdout="", stderr="", partial=False):
292292
_, out, err = script_helper.assert_python_ok('-m', 'tabnanny', *args)
293293
# Note: The `splitlines()` will solve the problem of CRLF(\r) added
294294
# by OS Windows.
295-
out = out.decode('ascii')
296-
err = err.decode('ascii')
295+
out = os.fsdecode(out)
296+
err = os.fsdecode(err)
297297
if partial:
298298
for std, output in ((stdout, out), (stderr, err)):
299299
_output = output.splitlines()

0 commit comments

Comments
 (0)