diff options
| author | Ezio Melotti <ezio.melotti@gmail.com> | 2012-11-03 23:03:39 +0200 |
|---|---|---|
| committer | Ezio Melotti <ezio.melotti@gmail.com> | 2012-11-03 23:03:39 +0200 |
| commit | 540da76115f46da48e39d3685739afc284cfbddb (patch) | |
| tree | 2c44bcea737de9702baba6531b42331179b962a9 /Lib | |
| parent | 8af179e7447fb55bb13d0a7d7cfddbdc72e69b2c (diff) | |
| download | cpython-git-540da76115f46da48e39d3685739afc284cfbddb.tar.gz | |
#16336: fix input checking in the surrogatepass error handler. Patch by Serhiy Storchaka.
Diffstat (limited to 'Lib')
| -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 42d0da3e70..0f7c23efcc 100644 --- a/Lib/test/test_codecs.py +++ b/Lib/test/test_codecs.py @@ -647,6 +647,8 @@ class UTF8Test(ReadTest): self.assertTrue(codecs.lookup_error("surrogatepass")) with self.assertRaises(UnicodeDecodeError): b"abc\xed\xa0".decode("utf-8", "surrogatepass") + with self.assertRaises(UnicodeDecodeError): + b"abc\xed\xa0z".decode("utf-8", "surrogatepass") class UTF7Test(ReadTest): encoding = "utf-7" |
