diff options
Diffstat (limited to 'Lib/test/test_long.py')
-rw-r--r-- | Lib/test/test_long.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_long.py b/Lib/test/test_long.py index 8be8bff..223ef7c 100644 --- a/Lib/test/test_long.py +++ b/Lib/test/test_long.py @@ -537,6 +537,10 @@ class LongTest(unittest.TestCase): # conversion to string should fail self.assertRaises(ValueError, format, 3, "s") + 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) |