summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_builtin.py
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2003-01-28 19:21:24 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2003-01-28 19:21:24 (GMT)
commitabcb0c03ade3cee52b71362f57b16af3e00c743b (patch)
treea4afc16116d2e0d08a0ea162932cb635b550bde0 /Lib/test/test_builtin.py
parent54fb192508130fa17df5b252c63d125218907035 (diff)
downloadcpython-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.py1
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')