[pypy-commit] pypy default: Fix a CPython test
arigo
noreply at buildbot.pypy.org
Tue Dec 16 17:10:40 CET 2014
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r74953:09728db49463
Date: 2014-12-16 15:31 +0000
http://bitbucket.org/pypy/pypy/changeset/09728db49463/
Log: Fix a CPython test
diff --git a/lib-python/2.7/test/test_collections.py b/lib-python/2.7/test/test_collections.py
--- a/lib-python/2.7/test/test_collections.py
+++ b/lib-python/2.7/test/test_collections.py
@@ -1179,7 +1179,11 @@
od = OrderedDict(pairs)
# yaml.dump(od) -->
# '!!python/object/apply:__main__.OrderedDict\n- - [a, 1]\n - [b, 2]\n'
- self.assertTrue(all(type(pair)==list for pair in od.__reduce__()[1]))
+
+ # PyPy bug fix: added [0] at the end of this line, because the
+ # test is really about the 2-tuples that need to be 2-lists
+ # inside the list of 6 of them
+ self.assertTrue(all(type(pair)==list for pair in od.__reduce__()[1][0]))
def test_reduce_not_too_fat(self):
# do not save instance dictionary if not needed
More information about the pypy-commit
mailing list