mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
Move the old test_generator_cycle.py which leaked but was removed into the test
This commit is contained in:
parent
03f3be50af
commit
cde8750414
1 changed files with 17 additions and 0 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue