Commit eb6b0eec authored by Brett Cannon's avatar Brett Cannon

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?
parent 861fd6fd
test_bsddb test_bsddb3 test_compile test_dumbdbm
test_importhooks test_iter test_iterlen
test_importhooks test_iter
......@@ -139,14 +139,14 @@ class TestDictItems(TestTemporarilyImmutable):
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):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment