Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
0cfa58c4
Kaydet (Commit)
0cfa58c4
authored
Nis 13, 2006
tarafından
Neal Norwitz
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Remove tests that no longer leak. There is still one leaking generator test
üst
5f5a69ba
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
30 deletions
+19
-30
test_gen1.py
Lib/test/leakers/test_gen1.py
+19
-0
test_generator_cycle.py
Lib/test/leakers/test_generator_cycle.py
+0
-10
test_tee.py
Lib/test/leakers/test_tee.py
+0
-20
No files found.
Lib/test/leakers/test_gen1.py
0 → 100644
Dosyayı görüntüle @
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
Dosyayı görüntüle @
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
Dosyayı görüntüle @
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