[Python-checkins] r45334 - python/trunk/Lib/test/leakers/test_gen1.py python/trunk/Lib/test/leakers/test_generator_cycle.py python/trunk/Lib/test/leakers/test_tee.py
Jim Jewett
jimjjewett at gmail.com
Thu Apr 13 18:45:08 CEST 2006
Should these really be removed, or just added to the regular tests --
to ensure that the leakage doesn't get worse.
-jJ
On 4/13/06, neal.norwitz <python-checkins at python.org> wrote:
> Author: neal.norwitz
> Date: Thu Apr 13 06:35:36 2006
> New Revision: 45334
>
> Added:
> python/trunk/Lib/test/leakers/test_gen1.py (contents, props changed)
> Removed:
> python/trunk/Lib/test/leakers/test_generator_cycle.py
> python/trunk/Lib/test/leakers/test_tee.py
> Log:
> Remove tests that no longer leak. There is still one leaking generator test
>
> Added: python/trunk/Lib/test/leakers/test_gen1.py
> ==============================================================================
> --- (empty file)
> +++ python/trunk/Lib/test/leakers/test_gen1.py Thu Apr 13 06:35:36 2006
> @@ -0,0 +1,19 @@
> +import gc
> +
> +# Taken from test_generators
> +
> +def f():
> + try:
> + yield
> + except GeneratorExit:
> + yield "foo!"
> +
> +def inner_leak():
> + g = f()
> + g.next()
> +
> +def leak():
> + inner_leak()
> + gc.collect()
> + gc.collect()
> + gc.collect()
>
> Deleted: /python/trunk/Lib/test/leakers/test_generator_cycle.py
> ==============================================================================
> --- /python/trunk/Lib/test/leakers/test_generator_cycle.py Thu Apr 13 06:35:36 2006
> +++ (empty file)
> @@ -1,10 +0,0 @@
> -
> -# This leaks since the introduction of yield-expr and the use of generators
> -# as coroutines, trunk revision 39239. The cycle-GC doesn't seem to pick up
> -# the cycle, or decides it can't clean it up.
> -
> -def leak():
> - def gen():
> - while True:
> - yield g
> - g = gen()
>
> Deleted: /python/trunk/Lib/test/leakers/test_tee.py
> ==============================================================================
> --- /python/trunk/Lib/test/leakers/test_tee.py Thu Apr 13 06:35:36 2006
> +++ (empty file)
> @@ -1,20 +0,0 @@
> -
> -# Test case taken from test_itertools
> -# See http://mail.python.org/pipermail/python-dev/2005-November/058339.html
> -# When this is fixed remember to remove from LEAKY_TESTS in Misc/build.sh.
> -
> -from itertools import tee
> -
> -def leak():
> - def fib():
> - def yield_identity_forever(g):
> - while 1:
> - yield g
> - def _fib():
> - for i in yield_identity_forever(head):
> - yield i
> - head, tail, result = tee(_fib(), 3)
> - return result
> -
> - x = fib()
> - x.next()
> _______________________________________________
> Python-checkins mailing list
> Python-checkins at python.org
> http://mail.python.org/mailman/listinfo/python-checkins
>
More information about the Python-checkins
mailing list