summaryrefslogtreecommitdiffstats
path: root/Lib/test/leakers
diff options
context:
space:
mode:
authorThomas Wouters <thomas@python.org>2006-04-16 15:11:33 (GMT)
committerThomas Wouters <thomas@python.org>2006-04-16 15:11:33 (GMT)
commit631f513fd8c49873624a48cbc9f46e8e934fb905 (patch)
tree5de56809997cf891c0687cb46cc29d8e4187157d /Lib/test/leakers
parent195e4e67e718635bd6107b3730e96d3c6f6c7f64 (diff)
downloadcpython-631f513fd8c49873624a48cbc9f46e8e934fb905.zip
cpython-631f513fd8c49873624a48cbc9f46e8e934fb905.tar.gz
cpython-631f513fd8c49873624a48cbc9f46e8e934fb905.tar.bz2
This test no longer leaks, and test_generators sufficiently tests it to
prevent unreported regression.
Diffstat (limited to 'Lib/test/leakers')
-rw-r--r--Lib/test/leakers/test_tee.py25
1 files changed, 0 insertions, 25 deletions
diff --git a/Lib/test/leakers/test_tee.py b/Lib/test/leakers/test_tee.py
deleted file mode 100644
index db2867a..0000000
--- a/Lib/test/leakers/test_tee.py
+++ /dev/null
@@ -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()