Commit 70f88c59 authored by Victor Stinner's avatar Victor Stinner

Fix test_os: workaround #8611 bug

parent 5ea823cf
......@@ -1165,9 +1165,16 @@ class FSEncodingTests(unittest.TestCase):
decoded = self.get_output(encoding, 'repr(os.fsdecode(%a))' % bytesfn)
self.assertEqual(decoded, repr(unicodefn))
check('ascii', b'abc\xff', 'abc\udcff')
check('utf-8', b'\xc3\xa9\x80', '\xe9\udc80')
check('iso-8859-15', b'\xef\xa4', '\xef\u20ac')
try:
sys.executable.encode("ascii")
except UnicodeEncodeError:
# Python doesn't start with ASCII locale if its path is not ASCII,
# see issue #8611
pass
else:
check('ascii', b'abc\xff', 'abc\udcff')
check('iso-8859-15', b'\xef\xa4', '\xef\u20ac')
def test_main():
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment