summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_iter.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2006-08-22 00:21:25 (GMT)
committerGuido van Rossum <guido@python.org>2006-08-22 00:21:25 (GMT)
commit89da5d7c3d9cf5bfd4a374e23fd924bbffdeaf5c (patch)
treeaef767c70a3b57c4128d44816e4e070d28fffb9d /Lib/test/test_iter.py
parent6cefeb0e8156406ac3f99248f6a3d3cd1536ca23 (diff)
downloadcpython-89da5d7c3d9cf5bfd4a374e23fd924bbffdeaf5c.zip
cpython-89da5d7c3d9cf5bfd4a374e23fd924bbffdeaf5c.tar.gz
cpython-89da5d7c3d9cf5bfd4a374e23fd924bbffdeaf5c.tar.bz2
Kill reduce(). A coproduction of John Reese, Jacques Frechet, and Alex M.
Diffstat (limited to 'Lib/test/test_iter.py')
-rw-r--r--Lib/test/test_iter.py13
1 files changed, 0 insertions, 13 deletions
diff --git a/Lib/test/test_iter.py b/Lib/test/test_iter.py
index f83de78..324eb68 100644
--- a/Lib/test/test_iter.py
+++ b/Lib/test/test_iter.py
@@ -498,19 +498,6 @@ class TestCase(unittest.TestCase):
for y in NoGuessLen5(), Guess3Len5(), Guess30Len5():
self.assertEqual(zip(x, y), expected)
- # Test reduces()'s use of iterators.
- def test_builtin_reduce(self):
- from operator import add
- self.assertEqual(reduce(add, SequenceClass(5)), 10)
- self.assertEqual(reduce(add, SequenceClass(5), 42), 52)
- self.assertRaises(TypeError, reduce, add, SequenceClass(0))
- self.assertEqual(reduce(add, SequenceClass(0), 42), 42)
- self.assertEqual(reduce(add, SequenceClass(1)), 0)
- self.assertEqual(reduce(add, SequenceClass(1), 42), 42)
-
- d = {"one": 1, "two": 2, "three": 3}
- self.assertEqual(reduce(add, d), "".join(d.keys()))
-
# This test case will be removed if we don't have Unicode
def test_unicode_join_endcase(self):