diff options
author | Philip Jenvey <pjenvey@underboss.org> | 2012-10-27 00:05:09 (GMT) |
---|---|---|
committer | Philip Jenvey <pjenvey@underboss.org> | 2012-10-27 00:05:09 (GMT) |
commit | 5f9459fbedae091bff5b87189014a996f1352b1c (patch) | |
tree | 9f150bf1f8ef9ed039f37f176e46b75bb2b69976 /Lib/test/test_codecs.py | |
parent | 735d31723fb348f08be8fc2677dbb26beac5394a (diff) | |
parent | 45c41494bf4992d6c2a0bd1fca3d0dff164ec4ba (diff) | |
download | cpython-5f9459fbedae091bff5b87189014a996f1352b1c.zip cpython-5f9459fbedae091bff5b87189014a996f1352b1c.tar.gz cpython-5f9459fbedae091bff5b87189014a996f1352b1c.tar.bz2 |
merge with 3.2
Diffstat (limited to 'Lib/test/test_codecs.py')
-rw-r--r-- | Lib/test/test_codecs.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_codecs.py b/Lib/test/test_codecs.py index 4e808ec..93660f7 100644 --- a/Lib/test/test_codecs.py +++ b/Lib/test/test_codecs.py @@ -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') |