summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2013-06-23 17:21:16 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2013-06-23 17:21:16 (GMT)
commitc89533f72fbf15779d33c4533c801ed4c3d0ea18 (patch)
tree01f4fe4d0c1ca2ff5eac6f5158b0a58a2d309b6f /Lib/test
parentfcce2024ea97c76e25adf9ff45f72a9f0d431ac3 (diff)
parent8eeae2126ca7dd91ae6f10443eda1af5338bccf7 (diff)
downloadcpython-c89533f72fbf15779d33c4533c801ed4c3d0ea18.zip
cpython-c89533f72fbf15779d33c4533c801ed4c3d0ea18.tar.gz
cpython-c89533f72fbf15779d33c4533c801ed4c3d0ea18.tar.bz2
Issue #18184: PyUnicode_FromFormat() and PyUnicode_FromFormatV() now raise
OverflowError when an argument of %c format is out of range.
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_unicode.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_unicode.py b/Lib/test/test_unicode.py
index 382b463..518d6d6 100644
--- a/Lib/test/test_unicode.py
+++ b/Lib/test/test_unicode.py
@@ -2048,6 +2048,8 @@ class UnicodeTest(string_tests.CommonTest,
b'%c', c_int(0xabcd))
check_format('\U0010ffff',
b'%c', c_int(0x10ffff))
+ with self.assertRaises(OverflowError):
+ PyUnicode_FromFormat(b'%c', c_int(0x110000))
# Issue #18183
check_format('\U00010000\U00100000',
b'%c%c', c_int(0x10000), c_int(0x100000))