[pypy-commit] pypy default: Fix: dict ordering issue

arigo noreply at buildbot.pypy.org
Mon Dec 22 14:59:57 CET 2014


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r75059:218ec8282891
Date: 2014-12-22 14:59 +0100
http://bitbucket.org/pypy/pypy/changeset/218ec8282891/

Log:	Fix: dict ordering issue

diff --git a/pypy/objspace/std/test/test_dictproxy.py b/pypy/objspace/std/test/test_dictproxy.py
--- a/pypy/objspace/std/test/test_dictproxy.py
+++ b/pypy/objspace/std/test/test_dictproxy.py
@@ -15,14 +15,15 @@
         assert NotEmpty.__dict__.get("b") is None
         raises(TypeError, 'NotEmpty.__dict__[15] = "y"')
         raises(KeyError, 'del NotEmpty.__dict__[15]')
+
+        key, value = NotEmpty.__dict__.popitem()
+        assert (key == 'a' and value == 1) or (key == 'b' and value == 4)
+
         assert NotEmpty.__dict__.setdefault("string", 1) == 1
         assert NotEmpty.__dict__.setdefault("string", 2) == 1
         assert NotEmpty.string == 1
         raises(TypeError, 'NotEmpty.__dict__.setdefault(15, 1)')
 
-        key, value = NotEmpty.__dict__.popitem()
-        assert (key == 'a' and value == 1) or (key == 'b' and value == 4)
-
     def test_dictproxy_getitem(self):
         class NotEmpty(object):
             a = 1


More information about the pypy-commit mailing list