bpo-41401: Fix test_fspath_support in test_io. (GH-21640) (GH-22133) (GH-22135)
The error is exposed on non-UTF-8 locales. (cherry picked from commit67987acd5d
) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> (cherry picked from commitc73ee5acc9
)
This commit is contained in:
parent
4e581d64b8
commit
84105cbaa3
|
@ -922,7 +922,7 @@ class IOTest(unittest.TestCase):
|
|||
self.assertEqual(f.read(), "egg\n")
|
||||
|
||||
check_path_succeeds(FakePath(support.TESTFN))
|
||||
check_path_succeeds(FakePath(support.TESTFN.encode('utf-8')))
|
||||
check_path_succeeds(FakePath(os.fsencode(support.TESTFN)))
|
||||
|
||||
with self.open(support.TESTFN, "w") as f:
|
||||
bad_path = FakePath(f.fileno())
|
||||
|
|
Loading…
Reference in New Issue