summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_long.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_long.py')
-rw-r--r--Lib/test/test_long.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_long.py b/Lib/test/test_long.py
index 29515c7..d745350 100644
--- a/Lib/test/test_long.py
+++ b/Lib/test/test_long.py
@@ -498,6 +498,10 @@ class LongTest(unittest.TestCase):
eq(x > y, Rcmp > 0, Frm("%r > %r %d", x, y, Rcmp))
eq(x >= y, Rcmp >= 0, Frm("%r >= %r %d", x, y, Rcmp))
+ def test_nan_inf(self):
+ self.assertRaises(OverflowError, long, float('inf'))
+ self.assertEqual(long(float('nan')), 0L)
+
def test_main():
test_support.run_unittest(LongTest)