summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2020-07-27 17:58:35 (GMT)
committerGitHub <noreply@github.com>2020-07-27 17:58:35 (GMT)
commit67987acd5dc9776f55f4e139e2b3d9e7a6434d9f (patch)
treedcd7434c6abef096638562294a58d184ce153271 /Lib/test
parent855e68855eeb06f8f0319b3366d3a012c2ff2041 (diff)
downloadcpython-67987acd5dc9776f55f4e139e2b3d9e7a6434d9f.zip
cpython-67987acd5dc9776f55f4e139e2b3d9e7a6434d9f.tar.gz
cpython-67987acd5dc9776f55f4e139e2b3d9e7a6434d9f.tar.bz2
bpo-41401: Fix test_fspath_support in test_io. (GH-21640)
The error is exposed on non-UTF-8 locales.
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_io.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_io.py b/Lib/test/test_io.py
index 18b8a79..85fac30 100644
--- a/Lib/test/test_io.py
+++ b/Lib/test/test_io.py
@@ -928,7 +928,7 @@ class IOTest(unittest.TestCase):
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())