Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
0cfa58c4
Commit
0cfa58c4
authored
Apr 13, 2006
by
Neal Norwitz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove tests that no longer leak. There is still one leaking generator test
parent
5f5a69ba
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
30 deletions
+19
-30
Lib/test/leakers/test_gen1.py
Lib/test/leakers/test_gen1.py
+19
-0
Lib/test/leakers/test_generator_cycle.py
Lib/test/leakers/test_generator_cycle.py
+0
-10
Lib/test/leakers/test_tee.py
Lib/test/leakers/test_tee.py
+0
-20
No files found.
Lib/test/leakers/test_gen1.py
0 → 100644
View file @
0cfa58c4
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
()
Lib/test/leakers/test_generator_cycle.py
deleted
100644 → 0
View file @
5f5a69ba
# 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
()
Lib/test/leakers/test_tee.py
deleted
100644 → 0
View file @
5f5a69ba
# 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
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment