summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2011-04-15 05:19:32 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2011-04-15 05:19:32 (GMT)
commita15f614a0cc7bc76bac0fa1a6e050967ca1bacd7 (patch)
tree4828ba2529f3f8ef6c0d688dfb35ffc6f4b88283 /Lib
parent5ee8cb1201e2c926f8c9c8cd6a79c054746f57b6 (diff)
parent982ef4e0bc2b1def1117238fb5292cca5dfa2891 (diff)
downloadcpython-a15f614a0cc7bc76bac0fa1a6e050967ca1bacd7.zip
cpython-a15f614a0cc7bc76bac0fa1a6e050967ca1bacd7.tar.gz
cpython-a15f614a0cc7bc76bac0fa1a6e050967ca1bacd7.tar.bz2
#11845: Merge with 3.2.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_range.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/test/test_range.py b/Lib/test/test_range.py
index fc310c1..ede0791 100644
--- a/Lib/test/test_range.py
+++ b/Lib/test/test_range.py
@@ -498,6 +498,15 @@ class RangeTest(unittest.TestCase):
]:
self.assertEqual(list(reversed(r)), list(r)[::-1])
+ def test_issue11845(self):
+ r = range(*slice(1, 18, 2).indices(20))
+ values = {None, 0, 1, -1, 2, -2, 5, -5, 19, -19,
+ 20, -20, 21, -21, 30, -30, 99, -99}
+ for i in values:
+ for j in values:
+ for k in values - {0}:
+ r[i:j:k]
+
def test_main():
test.support.run_unittest(RangeTest)