Author: Brian Kearns <[email protected]>
Branch: stdlib-2.7.4
Changeset: r60756:6b5838c00f9b
Date: 2013-01-31 03:49 -0500
http://bitbucket.org/pypy/pypy/changeset/6b5838c00f9b/

Log:    fixes for test_weakset.py

diff --git a/lib-python/2.7/test/test_weakset.py 
b/lib-python/2.7/test/test_weakset.py
--- a/lib-python/2.7/test/test_weakset.py
+++ b/lib-python/2.7/test/test_weakset.py
@@ -416,7 +416,7 @@
         gc.collect()
         n1 = len(s)
         del it
-        gc.collect()
+        test_support.gc_collect()
         n2 = len(s)
         # one item may be kept alive inside the iterator
         self.assertIn(n1, (0, 1))
@@ -424,11 +424,11 @@
 
     def test_len_race(self):
         # Extended sanity checks for len() in the face of cyclic collection
-        self.addCleanup(gc.set_threshold, *gc.get_threshold())
+        #self.addCleanup(gc.set_threshold, *gc.get_threshold())
         for th in range(1, 100):
             N = 20
-            gc.collect(0)
-            gc.set_threshold(th, th, th)
+            test_support.gc_collect()
+            #gc.set_threshold(th, th, th)
             items = [RefCycle() for i in range(N)]
             s = WeakSet(items)
             del items
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to