[pypy-commit] pypy set-strategies: uh? this test is clearly dict order dependent

cfbolz noreply at buildbot.pypy.org
Fri Nov 18 13:40:31 CET 2011


Author: Carl Friedrich Bolz <cfbolz at gmx.de>
Branch: set-strategies
Changeset: r49521:617ce44795c0
Date: 2011-11-18 13:40 +0100
http://bitbucket.org/pypy/pypy/changeset/617ce44795c0/

Log:	uh? this test is clearly dict order dependent

diff --git a/pypy/objspace/std/test/test_setobject.py b/pypy/objspace/std/test/test_setobject.py
--- a/pypy/objspace/std/test/test_setobject.py
+++ b/pypy/objspace/std/test/test_setobject.py
@@ -791,11 +791,13 @@
         raises(TypeError, s.discard, set([1]))
 
     def test_create_set_from_set(self):
+        # no sharing
         x = set([1,2,3])
         y = set(x)
-        x.pop()
-        assert x == set([2,3])
+        a = x.pop()
         assert y == set([1,2,3])
+        assert len(x) == 2
+        assert x.union(set([a])) == y
 
     def test_never_change_frozenset(self):
         a = frozenset([1,2])


More information about the pypy-commit mailing list