summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_range.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2010-11-20 23:03:34 (GMT)
committerBenjamin Peterson <benjamin@python.org>2010-11-20 23:03:34 (GMT)
commitd57bb55c7d8f98aacb568ab6e32155acedb12ca2 (patch)
tree99793ebafb531131bbc770238c5153be777a840f /Lib/test/test_range.py
parent8d16ab3c5608d7e3f4cb5177d84397732b4a1587 (diff)
downloadcpython-d57bb55c7d8f98aacb568ab6e32155acedb12ca2.zip
cpython-d57bb55c7d8f98aacb568ab6e32155acedb12ca2.tar.gz
cpython-d57bb55c7d8f98aacb568ab6e32155acedb12ca2.tar.bz2
fix two broken tests
Diffstat (limited to 'Lib/test/test_range.py')
-rw-r--r--Lib/test/test_range.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_range.py b/Lib/test/test_range.py
index e98ce92..5cbc11b 100644
--- a/Lib/test/test_range.py
+++ b/Lib/test/test_range.py
@@ -142,6 +142,7 @@ class RangeTest(unittest.TestCase):
self.assertRaises(TypeError, range)
self.assertRaises(TypeError, range, 1, 2, 3, 4)
self.assertRaises(ValueError, range, 1, 2, 0)
+ a = int(10 * sys.maxsize)
self.assertRaises(ValueError, range, a, a + 1, int(0))
self.assertRaises(TypeError, range, 1., 1., 1.)
self.assertRaises(TypeError, range, 1e100, 1e101, 1e101)
@@ -199,7 +200,7 @@ class RangeTest(unittest.TestCase):
def __eq__(self, other):
return True
always_equal = AlwaysEqual()
- self.assertEqual(range(10).index(always_equal), 10)
+ self.assertEqual(range(10).index(always_equal), 0)
def test_user_index_method(self):
bignum = 2*sys.maxsize