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
f425b1ec
Kaydet (Commit)
f425b1ec
authored
Tem 14, 2003
tarafından
Fred Drake
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
stylistic nits:
- wrap some long lines - shorten others - fix indentation
üst
d9cf8e7e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
test_weakref.py
Lib/test/test_weakref.py
+8
-6
No files found.
Lib/test/test_weakref.py
Dosyayı görüntüle @
f425b1ec
...
...
@@ -168,7 +168,8 @@ class ReferencesTestCase(TestBase):
p
[:]
=
[
2
,
3
]
self
.
assertEqual
(
len
(
L
),
2
)
self
.
assertEqual
(
len
(
p
),
2
)
self
.
failUnless
(
3
in
p
,
"proxy didn't support __contains__() properly"
)
self
.
failUnless
(
3
in
p
,
"proxy didn't support __contains__() properly"
)
p
[
1
]
=
5
self
.
assertEqual
(
L
[
1
],
5
)
self
.
assertEqual
(
p
[
1
],
5
)
...
...
@@ -398,7 +399,8 @@ class MappingTestCase(TestBase):
values
=
dict
.
values
()
for
v
in
dict
.
itervalues
():
values
.
remove
(
v
)
self
.
assert_
(
len
(
values
)
==
0
,
"itervalues() did not touch all values"
)
self
.
assert_
(
len
(
values
)
==
0
,
"itervalues() did not touch all values"
)
def
test_make_weak_keyed_dict_from_dict
(
self
):
o
=
Object
(
3
)
...
...
@@ -589,14 +591,14 @@ class MappingTestCase(TestBase):
from
test_userdict
import
TestMappingProtocol
class
WeakValueDictionaryTestCase
(
TestMappingProtocol
):
"""Check that WeakValueDictionary c
lass c
onforms to the mapping protocol"""
"""Check that WeakValueDictionary conforms to the mapping protocol"""
__ref
=
{
"key1"
:
Object
(
1
),
"key2"
:
Object
(
2
),
"key3"
:
Object
(
3
)}
_tested_class
=
weakref
.
WeakValueDictionary
def
_reference
(
self
):
return
self
.
__ref
.
copy
()
class
WeakKeyDictionaryTestCase
(
TestMappingProtocol
):
"""Check that WeakKeyDictionary c
lass c
onforms to the mapping protocol"""
"""Check that WeakKeyDictionary conforms to the mapping protocol"""
__ref
=
{
Object
(
"key1"
):
1
,
Object
(
"key2"
):
2
,
Object
(
"key3"
):
3
}
_tested_class
=
weakref
.
WeakKeyDictionary
def
_reference
(
self
):
...
...
@@ -607,8 +609,8 @@ def test_main():
ReferencesTestCase
,
MappingTestCase
,
WeakValueDictionaryTestCase
,
WeakKeyDictionaryTestCase
)
WeakKeyDictionaryTestCase
,
)
if
__name__
==
"__main__"
:
...
...
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