mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
bpo-41401: Fix test_fspath_support in test_io. (GH-21640) (GH-22133)
The error is exposed on non-UTF-8 locales.
(cherry picked from commit 67987acd5d
)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
This commit is contained in:
parent
b6d2acb1b1
commit
c73ee5acc9
1 changed files with 1 additions and 1 deletions
|
@ -924,7 +924,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…
Add table
Add a link
Reference in a new issue