[Python-checkins] r45452 - python/trunk/Lib/test/leakers/test_tee.py
thomas.wouters
python-checkins at python.org
Sun Apr 16 17:11:34 CEST 2006
Author: thomas.wouters
Date: Sun Apr 16 17:11:33 2006
New Revision: 45452
Removed:
python/trunk/Lib/test/leakers/test_tee.py
Log:
This test no longer leaks, and test_generators sufficiently tests it to
prevent unreported regression.
Deleted: /python/trunk/Lib/test/leakers/test_tee.py
==============================================================================
--- /python/trunk/Lib/test/leakers/test_tee.py Sun Apr 16 17:11:33 2006
+++ (empty file)
@@ -1,25 +0,0 @@
-
-# Test case taken from test_generators
-# See http://mail.python.org/pipermail/python-dev/2005-November/058339.html
-
-from itertools import tee
-import gc
-
-def leak():
- def inner():
- 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()
- inner()
- gc.collect() ; gc.collect()
- # this is expected to return 0
- return gc.collect()
More information about the Python-checkins
mailing list