Commits

Philip Jenvey  committed 04d69d1

use support.gc_collect()

  • Participants
  • Parent commits 22a93bb
  • Branches py3k

Comments (0)

Files changed (1)

File lib-python/3.2/test/test_threading_local.py

             t.join()
         del t
 
-        gc.collect()
+        support.gc_collect()
         self.assertEqual(len(weaklist), n)
 
         # XXX _threading_local keeps the local of the last stopped thread alive.
 
         # Assignment to the same thread local frees it sometimes (!)
         local.someothervar = None
-        gc.collect()
+        support.gc_collect()
         deadlist = [weak for weak in weaklist if weak() is None]
         self.assertIn(len(deadlist), (n-1, n), (n, len(deadlist)))
 
             # 2) GC the cycle (triggers threadmodule.c::local_clear
             # before local_dealloc)
             del cycle
-            gc.collect()
+            support.gc_collect()
             e1.set()
             e2.wait()
 
         x.local.x = x
         wr = weakref.ref(x)
         del x
-        gc.collect()
+        support.gc_collect()
         self.assertIs(wr(), None)