diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2013-06-23 17:21:16 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2013-06-23 17:21:16 (GMT) |
commit | c89533f72fbf15779d33c4533c801ed4c3d0ea18 (patch) | |
tree | 01f4fe4d0c1ca2ff5eac6f5158b0a58a2d309b6f /Lib | |
parent | fcce2024ea97c76e25adf9ff45f72a9f0d431ac3 (diff) | |
parent | 8eeae2126ca7dd91ae6f10443eda1af5338bccf7 (diff) | |
download | cpython-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')
-rw-r--r-- | Lib/test/test_unicode.py | 2 |
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)) |