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

Log:    fixes for test_weakref.py

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
@@ -1,3 +1,4 @@
+import gc
 import sys
 import unittest
 import UserList
@@ -919,7 +920,7 @@
         gc.collect()
         n1 = len(dct)
         del it
-        gc.collect()
+        test_support.gc_collect()
         n2 = len(dct)
         # one item may be kept alive inside the iterator
         self.assertIn(n1, (0, 1))
@@ -933,11 +934,11 @@
 
     def check_len_race(self, dict_type, cons):
         # 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)]
             dct = dict_type(cons(o) for o in items)
             del items
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to