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
0a27e3db
Kaydet (Commit)
0a27e3db
authored
Haz 02, 2009
tarafından
Gregory P. Smith
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Add test code to verify that relative comparison operators with an object
of the wrong type fail properly (TypeError is raised).
üst
181bdc63
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
test_ipaddr.py
Lib/test/test_ipaddr.py
+10
-0
No files found.
Lib/test/test_ipaddr.py
Dosyayı görüntüle @
0a27e3db
...
...
@@ -396,6 +396,16 @@ class IpaddrUnitTest(unittest.TestCase):
self
.
assertFalse
(
ip2
>
ip3
)
self
.
assertTrue
(
ip3
>
ip2
)
# Confirm that relative comparisons to the wrong type fail properly.
self
.
assertRaises
(
TypeError
,
lambda
:
ipv4
<
''
)
self
.
assertRaises
(
TypeError
,
lambda
:
ipv4
>
''
)
self
.
assertRaises
(
TypeError
,
lambda
:
ipv4
>=
''
)
self
.
assertRaises
(
TypeError
,
lambda
:
ipv4
<=
''
)
self
.
assertRaises
(
TypeError
,
lambda
:
ipv6
<
''
)
self
.
assertRaises
(
TypeError
,
lambda
:
ipv6
>
''
)
self
.
assertRaises
(
TypeError
,
lambda
:
ipv6
>=
''
)
self
.
assertRaises
(
TypeError
,
lambda
:
ipv6
<=
''
)
def
test_embedded_ipv4
(
self
):
ipv4_string
=
'192.168.0.1'
ipv4
=
ipaddr
.
IPv4
(
ipv4_string
)
...
...
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