summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_codecs.py
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2012-11-03 21:03:39 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2012-11-03 21:03:39 (GMT)
commit540da76115f46da48e39d3685739afc284cfbddb (patch)
tree2c44bcea737de9702baba6531b42331179b962a9 /Lib/test/test_codecs.py
parent8af179e7447fb55bb13d0a7d7cfddbdc72e69b2c (diff)
downloadcpython-540da76115f46da48e39d3685739afc284cfbddb.zip
cpython-540da76115f46da48e39d3685739afc284cfbddb.tar.gz
cpython-540da76115f46da48e39d3685739afc284cfbddb.tar.bz2
#16336: fix input checking in the surrogatepass error handler. Patch by Serhiy Storchaka.
Diffstat (limited to 'Lib/test/test_codecs.py')
-rw-r--r--Lib/test/test_codecs.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_codecs.py b/Lib/test/test_codecs.py
index 42d0da3..0f7c23e 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"