]> granicus.if.org Git - python/commitdiff
Issue #1533: test_range in test_builtin: fix test comment and add test
authorMark Dickinson <dickinsm@gmail.com>
Wed, 5 May 2010 22:42:51 +0000 (22:42 +0000)
committerMark Dickinson <dickinsm@gmail.com>
Wed, 5 May 2010 22:42:51 +0000 (22:42 +0000)
for rejection of small floats.  Thanks Alexander Belopolsky.

Lib/test/test_builtin.py

index c03769d09bd89e483ab9b82ff639359311b7b646..465c5f8470cadfa866bcf18efe8d4ffb24d01522 100644 (file)
@@ -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")