summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_generators.py
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2006-04-14 06:11:08 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2006-04-14 06:11:08 (GMT)
commitcde87504145085dc371c74d755a5084de5dd9b64 (patch)
tree177e82687be14458a5d8e2296039c8531684cd9d /Lib/test/test_generators.py
parent03f3be50af5bb56e27ffad28a31b21c060630273 (diff)
downloadcpython-cde87504145085dc371c74d755a5084de5dd9b64.zip
cpython-cde87504145085dc371c74d755a5084de5dd9b64.tar.gz
cpython-cde87504145085dc371c74d755a5084de5dd9b64.tar.bz2
Move the old test_generator_cycle.py which leaked but was removed into the test
Diffstat (limited to 'Lib/test/test_generators.py')
-rw-r--r--Lib/test/test_generators.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/Lib/test/test_generators.py b/Lib/test/test_generators.py
index 89f7a6d..3b7933e 100644
--- a/Lib/test/test_generators.py
+++ b/Lib/test/test_generators.py
@@ -739,6 +739,22 @@ 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.
@@ -1755,6 +1771,7 @@ __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,