merge with 3.2

This commit is contained in:
Philip Jenvey 2012-10-26 17:05:09 -07:00
commit 5f9459fbed
2 changed files with 6 additions and 3 deletions

View file

@ -666,6 +666,8 @@ class UTF8Test(ReadTest):
self.assertEqual(b"\xf0\x90\xbf\xbf\xed\xa0\x80".decode("utf-8", "surrogatepass"),
"\U00010fff\uD800")
self.assertTrue(codecs.lookup_error("surrogatepass"))
with self.assertRaises(UnicodeDecodeError):
b"abc\xed\xa0".decode("utf-8", "surrogatepass")
@unittest.skipUnless(sys.platform == 'win32',
'cp65001 is a Windows-only codec')