]> granicus.if.org Git - python/commitdiff
Consolidate 'leak_test1' and 'refleaks_tests', since they both test for the
authorThomas Wouters <thomas@python.org>
Sat, 15 Apr 2006 22:44:07 +0000 (22:44 +0000)
committerThomas Wouters <thomas@python.org>
Sat, 15 Apr 2006 22:44:07 +0000 (22:44 +0000)
same kind of thing.

Lib/test/test_generators.py

index 9f8334346b0d59216211febab3b58758216c6e3a..67781c981c4940ca607f0da321c4eb2e5fc5789e 100644 (file)
@@ -723,22 +723,6 @@ Ye olde Fibonacci generator, tee style.
 
 """
 
-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.
 
@@ -1746,6 +1730,21 @@ which stores returned items.
 
 >>> item = it.next()
 
+
+
+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()
+
+
 There should be more test_generator-induced refleaks here, after they get
 fixed.
 
@@ -1755,7 +1754,6 @@ __test__ = {"tut":      tutorial_tests,
             "pep":      pep_tests,
             "email":    email_tests,
             "fun":      fun_tests,
-            "leak1":    leak_test1,
             "syntax":   syntax_tests,
             "conjoin":  conjoin_tests,
             "weakref":  weakref_tests,