summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_itertools.py
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2010-11-30 03:09:05 (GMT)
committerRaymond Hettinger <python@rcn.com>2010-11-30 03:09:05 (GMT)
commit101f09e72f821bf153de0a3b8d361b9005a124da (patch)
treee7b38903c0966109dba1aa9af2195a851e17c350 /Lib/test/test_itertools.py
parentfdb32c15e4c5ab924b7f547c803befa58c2a490f (diff)
downloadcpython-101f09e72f821bf153de0a3b8d361b9005a124da.zip
cpython-101f09e72f821bf153de0a3b8d361b9005a124da.tar.gz
cpython-101f09e72f821bf153de0a3b8d361b9005a124da.tar.bz2
Issue #10323: Predictable final state for slice().
Diffstat (limited to 'Lib/test/test_itertools.py')
-rw-r--r--Lib/test/test_itertools.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_itertools.py b/Lib/test/test_itertools.py
index 479167e..a1875ff 100644
--- a/Lib/test/test_itertools.py
+++ b/Lib/test/test_itertools.py
@@ -788,6 +788,11 @@ class TestBasicOps(unittest.TestCase):
self.assertRaises(ValueError, islice, range(10), 1, 'a', 1)
self.assertEqual(len(list(islice(count(), 1, 10, maxsize))), 1)
+ # Issue #10323: Less islice in a predictable state
+ c = count()
+ self.assertEqual(list(islice(c, 1, 3, 50)), [1])
+ self.assertEqual(next(c), 3)
+
def test_takewhile(self):
data = [1, 3, 5, 20, 2, 4, 6, 8]
underten = lambda x: x<10