[pypy-commit] pypy stdlib-2.7.8: fix reliance on refcounting in test_weakref

bdkearns noreply at buildbot.pypy.org
Sun Aug 24 23:33:21 CEST 2014


Author: Brian Kearns <bdkearns at gmail.com>
Branch: stdlib-2.7.8
Changeset: r73052:62c9c61a36cf
Date: 2014-08-24 17:29 -0400
http://bitbucket.org/pypy/pypy/changeset/62c9c61a36cf/

Log:	fix reliance on refcounting in test_weakref

diff --git a/lib-python/2.7/test/test_weakref.py b/lib-python/2.7/test/test_weakref.py
--- a/lib-python/2.7/test/test_weakref.py
+++ b/lib-python/2.7/test/test_weakref.py
@@ -1162,6 +1162,7 @@
                 yield Object(v), v
             finally:
                 it = None           # should commit all removals
+                gc.collect()
         self.check_weak_destroy_and_mutate_while_iterating(dict, testcontext)
 
     def test_weak_values_destroy_while_iterating(self):
@@ -1183,6 +1184,7 @@
                 yield k, Object(k)
             finally:
                 it = None           # should commit all removals
+                gc.collect()
         self.check_weak_destroy_and_mutate_while_iterating(dict, testcontext)
 
     def test_make_weak_keyed_dict_from_dict(self):


More information about the pypy-commit mailing list