[pypy-svn] r79873 - pypy/branch/fast-forward/lib-python/modified-2.7.0/test

afa at codespeak.net afa at codespeak.net
Tue Dec 7 18:23:11 CET 2010


Author: afa
Date: Tue Dec  7 18:23:10 2010
New Revision: 79873

Modified:
   pypy/branch/fast-forward/lib-python/modified-2.7.0/test/test_weakref.py
Log:
The exact order of weakrefs is certainly an implementation detail.


Modified: pypy/branch/fast-forward/lib-python/modified-2.7.0/test/test_weakref.py
==============================================================================
--- pypy/branch/fast-forward/lib-python/modified-2.7.0/test/test_weakref.py	(original)
+++ pypy/branch/fast-forward/lib-python/modified-2.7.0/test/test_weakref.py	Tue Dec  7 18:23:10 2010
@@ -738,9 +738,11 @@
         self.assertEqual(weakref.getweakrefcount(o), 3)
         refs = weakref.getweakrefs(o)
         self.assertEqual(len(refs), 3)
-        self.assertTrue(r2 is refs[0])
-        self.assertIn(r1, refs[1:])
-        self.assertIn(r3, refs[1:])
+        assert set(refs) == set((r1, r2, r3))
+        if test_support.check_impl_detail():
+            self.assertTrue(r2 is refs[0])
+            self.assertIn(r1, refs[1:])
+            self.assertIn(r3, refs[1:])
 
     def test_subclass_refs_dont_conflate_callbacks(self):
         class MyRef(weakref.ref):



More information about the Pypy-commit mailing list