mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
long(float('nan')) raises an OverflowError as discussed on the mailing list a week ago
This commit is contained in:
parent
62fe8a8e1c
commit
386cd1e3c9
3 changed files with 7 additions and 2 deletions
|
|
@ -539,7 +539,7 @@ class LongTest(unittest.TestCase):
|
|||
|
||||
def test_nan_inf(self):
|
||||
self.assertRaises(OverflowError, int, float('inf'))
|
||||
self.assertEqual(int(float('nan')), 0)
|
||||
self.assertRaises(OverflowError, int, float('nan'))
|
||||
|
||||
def test_main():
|
||||
test_support.run_unittest(LongTest)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue