Issue #1533: test_range in test_builtin: fix test comment and add test
for rejection of small floats. Thanks Alexander Belopolsky.
This commit is contained in:
parent
31a673da52
commit
481ab89b75
|
@ -1070,8 +1070,8 @@ class BuiltinTest(unittest.TestCase):
|
|||
__hash__ = None # Invalid cmp makes this unhashable
|
||||
self.assertRaises(RuntimeError, range, a, a + 1, badzero(1))
|
||||
|
||||
# Reject floats when it would require PyLongs to represent.
|
||||
# (smaller floats still accepted, but deprecated)
|
||||
# Reject floats.
|
||||
self.assertRaises(TypeError, range, 1., 1., 1.)
|
||||
self.assertRaises(TypeError, range, 1e100, 1e101, 1e101)
|
||||
|
||||
self.assertRaises(TypeError, range, 0, "spam")
|
||||
|
|
Loading…
Reference in New Issue