mirror of https://github.com/python/cpython.git
Consolidate 'leak_test1' and 'refleaks_tests', since they both test for the
same kind of thing.
This commit is contained in:
parent
b3deb94dc6
commit
60eab2b676
|
@ -723,22 +723,6 @@
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
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
|
# syntax_tests mostly provokes SyntaxErrors. Also fiddling with #if 0
|
||||||
# hackery.
|
# hackery.
|
||||||
|
|
||||||
|
@ -1746,6 +1730,21 @@ def printsolution(self, x):
|
||||||
|
|
||||||
>>> item = it.next()
|
>>> 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
|
There should be more test_generator-induced refleaks here, after they get
|
||||||
fixed.
|
fixed.
|
||||||
|
|
||||||
|
@ -1755,7 +1754,6 @@ def printsolution(self, x):
|
||||||
"pep": pep_tests,
|
"pep": pep_tests,
|
||||||
"email": email_tests,
|
"email": email_tests,
|
||||||
"fun": fun_tests,
|
"fun": fun_tests,
|
||||||
"leak1": leak_test1,
|
|
||||||
"syntax": syntax_tests,
|
"syntax": syntax_tests,
|
||||||
"conjoin": conjoin_tests,
|
"conjoin": conjoin_tests,
|
||||||
"weakref": weakref_tests,
|
"weakref": weakref_tests,
|
||||||
|
|
Loading…
Reference in New Issue