Skip to content

Commit 750291e

Browse files
committed
test_ntpath and test_posixpath failed if sys.getfilesystemencoding()=='mbcs'
1 parent bde3e0b commit 750291e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Lib/test/support/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -844,7 +844,8 @@ def dec(*args, **kwargs):
844844
'\u20AC',
845845
):
846846
try:
847-
os.fsdecode(os.fsencode(character))
847+
if os.fsdecode(os.fsencode(character)) != character:
848+
raise UnicodeError
848849
except UnicodeError:
849850
pass
850851
else:

0 commit comments

Comments
 (0)