summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2010-12-03 02:33:53 (GMT)
committerRaymond Hettinger <python@rcn.com>2010-12-03 02:33:53 (GMT)
commit2d93e6ee637f3ec62114919835a32ed009b99a0b (patch)
tree06b053acac52d4fdc34fee5b33167f259eae3888 /Lib/test
parent240f112448fa26114c261cb290706226fb09152b (diff)
downloadcpython-2d93e6ee637f3ec62114919835a32ed009b99a0b.zip
cpython-2d93e6ee637f3ec62114919835a32ed009b99a0b.tar.gz
cpython-2d93e6ee637f3ec62114919835a32ed009b99a0b.tar.bz2
Update the itertools.accumulate() docs.
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_itertools.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/test/test_itertools.py b/Lib/test/test_itertools.py
index b8f6eec..b744636 100644
--- a/Lib/test/test_itertools.py
+++ b/Lib/test/test_itertools.py
@@ -66,6 +66,7 @@ class TestBasicOps(unittest.TestCase):
self.assertEqual(
list(accumulate(map(typ, range(10)))),
list(map(typ, [0, 1, 3, 6, 10, 15, 21, 28, 36, 45])))
+ self.assertEqual(list(accumulate('abc')), ['a', 'ab', 'abc']) # works with non-numeric
self.assertEqual(list(accumulate([])), []) # empty iterable
self.assertEqual(list(accumulate([7])), [7]) # iterable of length one
self.assertRaises(TypeError, accumulate, range(10), 5) # too many args