diff options
author | Brett Cannon <bcannon@gmail.com> | 2007-02-22 04:45:13 +0000 |
---|---|---|
committer | Brett Cannon <bcannon@gmail.com> | 2007-02-22 04:45:13 +0000 |
commit | eb6b0eec297d929aa5961f0f6a957b47fd945006 (patch) | |
tree | 15bd68959ace8b71f4aad5d8e503542c9eaee7ef /Lib/test/test_iterlen.py | |
parent | 861fd6fdb9592e6d58a281521dea53d47ecc6adf (diff) | |
download | cpython-git-eb6b0eec297d929aa5961f0f6a957b47fd945006.tar.gz |
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?
Diffstat (limited to 'Lib/test/test_iterlen.py')
-rw-r--r-- | Lib/test/test_iterlen.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_iterlen.py b/Lib/test/test_iterlen.py index e9a6a68816..8ff1d6bb17 100644 --- a/Lib/test/test_iterlen.py +++ b/Lib/test/test_iterlen.py @@ -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): |