[pypy-svn] r78728 - pypy/branch/fast-forward/lib-python/modified-2.7.0/test

afa at codespeak.net afa at codespeak.net
Fri Nov 5 12:47:45 CET 2010


Author: afa
Date: Fri Nov  5 12:47:44 2010
New Revision: 78728

Added:
   pypy/branch/fast-forward/lib-python/modified-2.7.0/test/test_generators.py
      - copied, changed from r78690, pypy/branch/fast-forward/lib-python/2.7.0/test/test_generators.py
Log:
A few gc.collect() to help generator finalization


Copied: pypy/branch/fast-forward/lib-python/modified-2.7.0/test/test_generators.py (from r78690, pypy/branch/fast-forward/lib-python/2.7.0/test/test_generators.py)
==============================================================================
--- pypy/branch/fast-forward/lib-python/2.7.0/test/test_generators.py	(original)
+++ pypy/branch/fast-forward/lib-python/modified-2.7.0/test/test_generators.py	Fri Nov  5 12:47:44 2010
@@ -1496,6 +1496,10 @@
 """
 
 coroutine_tests = """\
+A helper function to call gc.collect() without printing
+>>> import gc
+>>> def gc_collect(): gc.collect()
+
 Sending a value into a started generator:
 
 >>> def f():
@@ -1697,7 +1701,7 @@
 
 >>> g = f()
 >>> g.next()
->>> del g
+>>> del g; gc_collect()
 exiting
 
 >>> class context(object):
@@ -1708,7 +1712,7 @@
 ...          yield
 >>> g = f()
 >>> g.next()
->>> del g
+>>> del g; gc_collect()
 exiting
 
 
@@ -1721,7 +1725,7 @@
 
 >>> g = f()
 >>> g.next()
->>> del g
+>>> del g; gc_collect()
 finally
 
 



More information about the Pypy-commit mailing list