Skip to content

Commit

Permalink
bpo-41401: Fix test_fspath_support in test_io. (pythonGH-21640)
Browse files Browse the repository at this point in the history
The error is exposed on non-UTF-8 locales.
  • Loading branch information
serhiy-storchaka committed Jul 27, 2020
1 parent 855e688 commit 67987ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Lib/test/test_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -928,7 +928,7 @@ def check_path_succeeds(path):
self.assertEqual(f.read(), "egg\n")

check_path_succeeds(FakePath(os_helper.TESTFN))
check_path_succeeds(FakePath(os_helper.TESTFN.encode('utf-8')))
check_path_succeeds(FakePath(os.fsencode(os_helper.TESTFN)))

with self.open(os_helper.TESTFN, "w") as f:
bad_path = FakePath(f.fileno())
Expand Down

0 comments on commit 67987ac

Please sign in to comment.