[pypy-svn] pypy default: Add a missing gc.collect(). While we are at it, rewrite gc.collect() to

arigo commits-noreply at bitbucket.org
Sun Mar 6 01:39:00 CET 2011


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r42431:b786a23e83c2
Date: 2011-03-06 00:34 +0000
http://bitbucket.org/pypy/pypy/changeset/b786a23e83c2/

Log:	Add a missing gc.collect(). While we are at it, rewrite
	gc.collect() to test_support.gc_collect().

diff --git a/lib-python/modified-2.7.0/test/test_weakset.py b/lib-python/modified-2.7.0/test/test_weakset.py
--- a/lib-python/modified-2.7.0/test/test_weakset.py
+++ b/lib-python/modified-2.7.0/test/test_weakset.py
@@ -332,10 +332,11 @@
         next(it)             # Trigger internal iteration
         # Destroy an item
         del items[-1]
-        gc.collect()    # just in case
+        test_support.gc_collect()
         # We have removed either the first consumed items, or another one
         self.assertIn(len(list(it)), [len(items), len(items) - 1])
         del it
+        test_support.gc_collect()
         # The removal has been committed
         self.assertEqual(len(s), len(items))
 


More information about the Pypy-commit mailing list