[pypy-commit] pypy all_ordered_dicts: Fix another CPython test
arigo
noreply at buildbot.pypy.org
Tue Dec 16 21:03:23 CET 2014
Author: Armin Rigo <arigo at tunes.org>
Branch: all_ordered_dicts
Changeset: r74963:e283fc272bc7
Date: 2014-12-16 20:03 +0000
http://bitbucket.org/pypy/pypy/changeset/e283fc272bc7/
Log: Fix another 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
@@ -578,7 +578,12 @@
def __repr__(self):
return "MySet(%s)" % repr(list(self))
s = MySet([5,43,2,1])
- self.assertEqual(s.pop(), 1)
+ # changed from CPython 2.7: it was "s.pop() == 1" but I see
+ # nothing that guarantees a particular order here. In the
+ # 'all_ordered_dicts' branch of PyPy (or with OrderedDict
+ # instead of sets), it consistently returns 5, but this test
+ # should not rely on this or any other order.
+ self.assert_(s.pop() in [5,43,2,1])
def test_issue8750(self):
empty = WithSet()
More information about the pypy-commit
mailing list