diff options
author | Philip Jenvey <pjenvey@underboss.org> | 2012-10-26 17:05:55 -0700 |
---|---|---|
committer | Philip Jenvey <pjenvey@underboss.org> | 2012-10-26 17:05:55 -0700 |
commit | 16bb5450d6b68514039e4c5fe835482aced38b73 (patch) | |
tree | 23c248ac46963d2d17177a1bf68abb12ec452654 /Lib/test/test_codecs.py | |
parent | a0e41a2e9bb107003db2446cb13a02d48570c956 (diff) | |
parent | 5f9459fbedae091bff5b87189014a996f1352b1c (diff) | |
download | cpython-git-16bb5450d6b68514039e4c5fe835482aced38b73.tar.gz |
merge with 3.3
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 4e808ec6ac..93660f7a19 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') |