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
ec27d917
Kaydet (Commit)
ec27d917
authored
Haz 05, 2010
tarafından
Mark Dickinson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix test_py3kwarn not to test for __cmp__-related DeprecationWarning.
üst
674648e3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
12 deletions
+4
-12
test_py3kwarn.py
Lib/test/test_py3kwarn.py
+4
-12
No files found.
Lib/test/test_py3kwarn.py
Dosyayı görüntüle @
ec27d917
...
...
@@ -251,9 +251,7 @@ class TestPy3KWarnings(unittest.TestCase):
# With object as the base class
class
WarnOnlyCmp
(
object
):
def
__cmp__
(
self
,
other
):
pass
self
.
assertEqual
(
len
(
w
.
warnings
),
1
)
self
.
assertWarning
(
None
,
w
,
"Overriding __cmp__ blocks inheritance of __hash__ in 3.x"
)
self
.
assertEqual
(
len
(
w
.
warnings
),
0
)
w
.
reset
()
class
WarnOnlyEq
(
object
):
def
__eq__
(
self
,
other
):
pass
...
...
@@ -264,9 +262,7 @@ class TestPy3KWarnings(unittest.TestCase):
class
WarnCmpAndEq
(
object
):
def
__cmp__
(
self
,
other
):
pass
def
__eq__
(
self
,
other
):
pass
self
.
assertEqual
(
len
(
w
.
warnings
),
2
)
self
.
assertWarning
(
None
,
w
.
warnings
[
0
],
"Overriding __cmp__ blocks inheritance of __hash__ in 3.x"
)
self
.
assertEqual
(
len
(
w
.
warnings
),
1
)
self
.
assertWarning
(
None
,
w
,
"Overriding __eq__ blocks inheritance of __hash__ in 3.x"
)
w
.
reset
()
...
...
@@ -280,9 +276,7 @@ class TestPy3KWarnings(unittest.TestCase):
def
__hash__
(
self
):
pass
class
WarnOnlyCmp
(
DefinesAllThree
):
def
__cmp__
(
self
,
other
):
pass
self
.
assertEqual
(
len
(
w
.
warnings
),
1
)
self
.
assertWarning
(
None
,
w
,
"Overriding __cmp__ blocks inheritance of __hash__ in 3.x"
)
self
.
assertEqual
(
len
(
w
.
warnings
),
0
)
w
.
reset
()
class
WarnOnlyEq
(
DefinesAllThree
):
def
__eq__
(
self
,
other
):
pass
...
...
@@ -293,9 +287,7 @@ class TestPy3KWarnings(unittest.TestCase):
class
WarnCmpAndEq
(
DefinesAllThree
):
def
__cmp__
(
self
,
other
):
pass
def
__eq__
(
self
,
other
):
pass
self
.
assertEqual
(
len
(
w
.
warnings
),
2
)
self
.
assertWarning
(
None
,
w
.
warnings
[
0
],
"Overriding __cmp__ blocks inheritance of __hash__ in 3.x"
)
self
.
assertEqual
(
len
(
w
.
warnings
),
1
)
self
.
assertWarning
(
None
,
w
,
"Overriding __eq__ blocks inheritance of __hash__ in 3.x"
)
w
.
reset
()
...
...
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