summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_generators.py
diff options
context:
space:
mode:
authorThomas Wouters <thomas@python.org>2006-04-15 22:44:07 (GMT)
committerThomas Wouters <thomas@python.org>2006-04-15 22:44:07 (GMT)
commit60eab2b6769dd5e2ac6a35e24afe7e2973ad7b95 (patch)
tree6592cd9d628b054996fbedbe8c0274787f39c1ae /Lib/test/test_generators.py
parentb3deb94dc6fab592a825811e8a985fd2d8bbe2b4 (diff)
downloadcpython-60eab2b6769dd5e2ac6a35e24afe7e2973ad7b95.zip
cpython-60eab2b6769dd5e2ac6a35e24afe7e2973ad7b95.tar.gz
cpython-60eab2b6769dd5e2ac6a35e24afe7e2973ad7b95.tar.bz2
Consolidate 'leak_test1' and 'refleaks_tests', since they both test for the
same kind of thing.
Diffstat (limited to 'Lib/test/test_generators.py')
-rw-r--r--Lib/test/test_generators.py32
1 files changed, 15 insertions, 17 deletions
diff --git a/Lib/test/test_generators.py b/Lib/test/test_generators.py
index 9f83343..67781c9 100644
--- a/Lib/test/test_generators.py
+++ b/Lib/test/test_generators.py
@@ -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,