Author: Philip Jenvey <[email protected]>
Branch: py3k
Changeset: r59349:04d69d16844c
Date: 2012-12-06 14:42 -0800
http://bitbucket.org/pypy/pypy/changeset/04d69d16844c/
Log: use support.gc_collect()
diff --git a/lib-python/3.2/test/test_threading_local.py
b/lib-python/3.2/test/test_threading_local.py
--- a/lib-python/3.2/test/test_threading_local.py
+++ b/lib-python/3.2/test/test_threading_local.py
@@ -35,7 +35,7 @@
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.
@@ -44,7 +44,7 @@
# 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)))
@@ -92,7 +92,7 @@
# 2) GC the cycle (triggers threadmodule.c::local_clear
# before local_dealloc)
del cycle
- gc.collect()
+ support.gc_collect()
e1.set()
e2.wait()
@@ -193,7 +193,7 @@
x.local.x = x
wr = weakref.ref(x)
del x
- gc.collect()
+ support.gc_collect()
self.assertIs(wr(), None)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit