10000 bpo-44031: fix test_tabnanny failure in non-ascii CWD (GH-31014) · python/cpython@1dcd772 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1dcd772

Browse files
bpo-44031: fix test_tabnanny failure in non-ascii CWD (GH-31014)
(cherry picked from commit 108e66b) Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
1 parent 6a188d8 commit 1dcd772

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
@@ -293,8 +293,8 @@ def validate_cmd(self, *args, stdout="", stderr="", partial=False):
293293
_, out, err = script_helper.assert_python_ok('-m', 'tabnanny', *args)
294294
# Note: The `splitlines()` will solve the problem of CRLF(\r) added
295295
# by OS Windows.
296-
out = out.decode('ascii')
297-
err = err.decode('ascii')
296+
out = os.fsdecode(out)
297+
err = os.fsdecode(err)
298298
if partial:
299299
for std, output in ((stdout, out), (stderr, err)):
300300
_output = output.splitlines()

0 commit comments

Comments
 (0)
0