summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2008-03-01 02:27:46 (GMT)
committerMark Dickinson <dickinsm@gmail.com>2008-03-01 02:27:46 (GMT)
commit26a96fa493361ca098e3df3ab0e04c75e694b6ab (patch)
tree856c979b59584ec66444c3def4cc6319f3ef0ab0
parent873d9ff84cf991a4a63d659479ab97724e44283d (diff)
downloadcpython-26a96fa493361ca098e3df3ab0e04c75e694b6ab.zip
cpython-26a96fa493361ca098e3df3ab0e04c75e694b6ab.tar.gz
cpython-26a96fa493361ca098e3df3ab0e04c75e694b6ab.tar.bz2
Fix failing itertools test: since revision 61118,
itertools.chain consumes its arguments lazily, so chain(non_iterable) doesn't raise TypeError until the first call to__next__. The test has been changed to reflect this. Committing this in during the code freeze; the checkin was approved by Barry.
-rw-r--r--Lib/test/test_itertools.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_itertools.py b/Lib/test/test_itertools.py
index b1c1033..44762eb 100644
--- a/Lib/test/test_itertools.py
+++ b/Lib/test/test_itertools.py
@@ -695,7 +695,7 @@ class TestVariousIteratorArgs(unittest.TestCase):
self.assertEqual(list(chain(g(s))), list(g(s)))
self.assertEqual(list(chain(g(s), g(s))), list(g(s))+list(g(s)))
self.assertRaises(TypeError, list, chain(X(s)))
- self.assertRaises(TypeError, chain, N(s))
+ self.assertRaises(TypeError, list, chain(N(s)))
self.assertRaises(ZeroDivisionError, list, chain(E(s)))
def test_product(self):