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
a70e91c2
Kaydet (Commit)
a70e91c2
authored
Haz 27, 2010
tarafından
Benjamin Peterson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
mark tracking tests as implementation details
üst
b96fbb8d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
test_tuple.py
Lib/test/test_tuple.py
+4
-0
No files found.
Lib/test/test_tuple.py
Dosyayı görüntüle @
a70e91c2
...
...
@@ -96,6 +96,7 @@ class TupleTest(seq_tests.CommonTest):
gc
.
collect
()
self
.
assertTrue
(
gc
.
is_tracked
(
t
),
t
)
@test_support.cpython_only
def
test_track_literals
(
self
):
# Test GC-optimization of tuple literals
x
,
y
,
z
=
1.5
,
"a"
,
[]
...
...
@@ -136,16 +137,19 @@ class TupleTest(seq_tests.CommonTest):
self
.
_tracked
(
tp
(
tuple
([
obj
])
for
obj
in
[
x
,
y
,
z
]))
self
.
_tracked
(
tuple
(
tp
([
obj
])
for
obj
in
[
x
,
y
,
z
]))
@test_support.cpython_only
def
test_track_dynamic
(
self
):
# Test GC-optimization of dynamically constructed tuples.
self
.
check_track_dynamic
(
tuple
,
False
)
@test_support.cpython_only
def
test_track_subtypes
(
self
):
# Tuple subtypes must always be tracked
class
MyTuple
(
tuple
):
pass
self
.
check_track_dynamic
(
MyTuple
,
True
)
@test_support.cpython_only
def
test_bug7466
(
self
):
# Trying to untrack an unfinished tuple could crash Python
self
.
_not_tracked
(
tuple
(
gc
.
collect
()
for
i
in
range
(
101
)))
...
...
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