summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_itertools.py
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2004-12-05 09:25:51 (GMT)
committerRaymond Hettinger <python@rcn.com>2004-12-05 09:25:51 (GMT)
commitb2594050ea83d0fc9ddaeed2e33ec2436e9ca1bc (patch)
treefa2dd706cc0a7fe9136216fb0c45c88088205df8 /Lib/test/test_itertools.py
parentd2f70cbe8e2a0e50c2991071305450dbdaf0389a (diff)
downloadcpython-b2594050ea83d0fc9ddaeed2e33ec2436e9ca1bc.zip
cpython-b2594050ea83d0fc9ddaeed2e33ec2436e9ca1bc.tar.gz
cpython-b2594050ea83d0fc9ddaeed2e33ec2436e9ca1bc.tar.bz2
Added optional None arguments to itertools.islice().
Diffstat (limited to 'Lib/test/test_itertools.py')
-rw-r--r--Lib/test/test_itertools.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_itertools.py b/Lib/test/test_itertools.py
index 0f74c62..becb3b2 100644
--- a/Lib/test/test_itertools.py
+++ b/Lib/test/test_itertools.py
@@ -260,6 +260,8 @@ class TestBasicOps(unittest.TestCase):
# Test stop=None
self.assertEqual(list(islice(xrange(10), None)), range(10))
+ self.assertEqual(list(islice(xrange(10), None, None)), range(10))
+ self.assertEqual(list(islice(xrange(10), None, None, None)), range(10))
self.assertEqual(list(islice(xrange(10), 2, None)), range(2, 10))
self.assertEqual(list(islice(xrange(10), 1, None, 2)), range(1, 10, 2))