[pypy-commit] pypy py3k: fix failing defaultdict test -- need to call list
MichaelBlume
noreply at buildbot.pypy.org
Mon Mar 12 20:01:44 CET 2012
Author: Mike Blume <mike at loggly.com>
Branch: py3k
Changeset: r53329:7f44e04a79e4
Date: 2012-03-12 11:34 -0700
http://bitbucket.org/pypy/pypy/changeset/7f44e04a79e4/
Log: fix failing defaultdict test -- need to call list
dict.keys() and .items() return iterators, not lists
need to be explicitely coerced
diff --git a/pypy/module/_collections/test/test_defaultdict.py b/pypy/module/_collections/test/test_defaultdict.py
--- a/pypy/module/_collections/test/test_defaultdict.py
+++ b/pypy/module/_collections/test/test_defaultdict.py
@@ -32,12 +32,12 @@
from _collections import defaultdict
raises(TypeError, defaultdict, [('a', 5)])
d = defaultdict(None, [('a', 5)])
- assert d.items() == [('a', 5)]
+ assert list(d.items()) == [('a', 5)]
def test_kwds(self):
from _collections import defaultdict
d = defaultdict(default_factory=5)
- assert d.keys() == ['default_factory']
+ assert list(d.keys()) == ['default_factory']
def test_copy(self):
import _collections
More information about the pypy-commit
mailing list