[Python-3000-checkins] r53852 - in python/branches/p3yk: BROKEN Lib/test/test_iterlen.py
brett.cannon
python-3000-checkins at python.org
Thu Feb 22 05:45:16 CET 2007
Author: brett.cannon
Date: Thu Feb 22 05:45:13 2007
New Revision: 53852
Modified:
python/branches/p3yk/BROKEN
python/branches/p3yk/Lib/test/test_iterlen.py
Log:
Fix test_iterlen by returning the iterator of dict views. Problem is that
iteritems and itervalues' previous object were both an iterator *and* and
iterable. The tests expected an iterator but were given an iterable.
Should the 2to3 conversion for iter(values|items|keys) change the code to
``iter(dict.keys())`` to be more compatible?
Modified: python/branches/p3yk/BROKEN
==============================================================================
--- python/branches/p3yk/BROKEN (original)
+++ python/branches/p3yk/BROKEN Thu Feb 22 05:45:13 2007
@@ -1,2 +1,2 @@
test_bsddb test_bsddb3 test_compile test_dumbdbm
- test_importhooks test_iter test_iterlen
+ test_importhooks test_iter
Modified: python/branches/p3yk/Lib/test/test_iterlen.py
==============================================================================
--- python/branches/p3yk/Lib/test/test_iterlen.py (original)
+++ python/branches/p3yk/Lib/test/test_iterlen.py Thu Feb 22 05:45:13 2007
@@ -139,14 +139,14 @@
def setUp(self):
d = dict.fromkeys(xrange(n))
- self.it = d.items()
+ self.it = iter(d.items())
self.mutate = d.popitem
class TestDictValues(TestTemporarilyImmutable):
def setUp(self):
d = dict.fromkeys(xrange(n))
- self.it = d.values()
+ self.it = iter(d.values())
self.mutate = d.popitem
class TestSet(TestTemporarilyImmutable):
More information about the Python-3000-checkins
mailing list