diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2003-01-28 19:21:24 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2003-01-28 19:21:24 (GMT) |
commit | abcb0c03ade3cee52b71362f57b16af3e00c743b (patch) | |
tree | a4afc16116d2e0d08a0ea162932cb635b550bde0 /Lib/test/test_builtin.py | |
parent | 54fb192508130fa17df5b252c63d125218907035 (diff) | |
download | cpython-abcb0c03ade3cee52b71362f57b16af3e00c743b.zip cpython-abcb0c03ade3cee52b71362f57b16af3e00c743b.tar.gz cpython-abcb0c03ade3cee52b71362f57b16af3e00c743b.tar.bz2 |
Fix SF bug# 676155, RuntimeWarning with tp_compare
Check return value of PyLong_AsDouble(), it can return an error.
Diffstat (limited to 'Lib/test/test_builtin.py')
-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 f7e652d..55ea8d2 100644 --- a/Lib/test/test_builtin.py +++ b/Lib/test/test_builtin.py @@ -186,6 +186,7 @@ class BuiltinTest(unittest.TestCase): def __coerce__(self, other): raise ValueError self.assertRaises(ValueError, coerce, 42, BadNumber()) + self.assertRaises(OverflowError, coerce, 0.5, int("12345" * 1000)) def test_compile(self): compile('print 1\n', '', 'exec') |