diff options
author | Amaury Forgeot d'Arc <amauryfa@gmail.com> | 2008-07-31 21:28:03 (GMT) |
---|---|---|
committer | Amaury Forgeot d'Arc <amauryfa@gmail.com> | 2008-07-31 21:28:03 (GMT) |
commit | 39fd672dfe0bea76d0ae5823b864460757cb423b (patch) | |
tree | 291455c98dccac778c5780b1eb4b0cf5f0da3dca /Lib/test | |
parent | e7d8be80ba634fa15ece6f503c33592e0d333361 (diff) | |
download | cpython-39fd672dfe0bea76d0ae5823b864460757cb423b.zip cpython-39fd672dfe0bea76d0ae5823b864460757cb423b.tar.gz cpython-39fd672dfe0bea76d0ae5823b864460757cb423b.tar.bz2 |
#3479: unichr(2**32) used to return u'\x00'.
The argument was fetched in a long, but PyUnicode_FromOrdinal takes an int.
(why doesn't gcc issue a truncation warning in this case?)
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_builtin.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/test/test_builtin.py b/Lib/test/test_builtin.py index 15d80a3..70980f8 100644 --- a/Lib/test/test_builtin.py +++ b/Lib/test/test_builtin.py @@ -1297,6 +1297,7 @@ class BuiltinTest(unittest.TestCase): ) self.assertRaises(ValueError, unichr, sys.maxunicode+1) self.assertRaises(TypeError, unichr) + self.assertRaises((OverflowError, ValueError), unichr, 2**32) # We don't want self in vars(), so these are static methods |