[Python-3000-checkins] r61145 - python/branches/py3k/Lib/test/test_itertools.py
mark.dickinson
python-3000-checkins at python.org
Sat Mar 1 03:27:47 CET 2008
Author: mark.dickinson
Date: Sat Mar 1 03:27:46 2008
New Revision: 61145
Modified:
python/branches/py3k/Lib/test/test_itertools.py
Log:
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.
Modified: python/branches/py3k/Lib/test/test_itertools.py
==============================================================================
--- python/branches/py3k/Lib/test/test_itertools.py (original)
+++ python/branches/py3k/Lib/test/test_itertools.py Sat Mar 1 03:27:46 2008
@@ -695,7 +695,7 @@
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):
More information about the Python-3000-checkins
mailing list