[Python-checkins] r45376 - python/trunk/Lib/test/test_generators.py

neal.norwitz python-checkins at python.org
Fri Apr 14 08:11:09 CEST 2006


Author: neal.norwitz
Date: Fri Apr 14 08:11:08 2006
New Revision: 45376

Modified:
   python/trunk/Lib/test/test_generators.py
Log:
Move the old test_generator_cycle.py which leaked but was removed into the test

Modified: python/trunk/Lib/test/test_generators.py
==============================================================================
--- python/trunk/Lib/test/test_generators.py	(original)
+++ python/trunk/Lib/test/test_generators.py	Fri Apr 14 08:11:08 2006
@@ -739,6 +739,22 @@
 
 """
 
+leak_test1 = """
+
+This test leaked at one point due to generator finalization/destruction.
+It was copied from Lib/test/leakers/test_generator_cycle.py before the file
+was removed.
+
+>>> def leak():
+...    def gen():
+...        while True:
+...            yield g
+...    g = gen()
+
+>>> leak()
+
+"""
+
 # syntax_tests mostly provokes SyntaxErrors.  Also fiddling with #if 0
 # hackery.
 
@@ -1755,6 +1771,7 @@
             "pep":      pep_tests,
             "email":    email_tests,
             "fun":      fun_tests,
+            "leak1":    leak_test1,
             "syntax":   syntax_tests,
             "conjoin":  conjoin_tests,
             "weakref":  weakref_tests,


More information about the Python-checkins mailing list