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
fcfb324e
Kaydet (Commit)
fcfb324e
authored
Agu 31, 2013
tarafından
Charles-François Natali
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Use the recent support.HOSTv6 addition.
üst
79a53ea7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
8 deletions
+4
-8
__init__.py
Lib/test/support/__init__.py
+1
-1
test_socket.py
Lib/test/test_socket.py
+3
-7
No files found.
Lib/test/support/__init__.py
Dosyayı görüntüle @
fcfb324e
...
...
@@ -587,7 +587,7 @@ def _is_ipv6_enabled():
sock
=
None
try
:
sock
=
socket
.
socket
(
socket
.
AF_INET6
,
socket
.
SOCK_STREAM
)
sock
.
bind
((
'::1'
,
0
))
sock
.
bind
((
HOSTv6
,
0
))
return
True
except
OSError
:
pass
...
...
Lib/test/test_socket.py
Dosyayı görüntüle @
fcfb324e
...
...
@@ -565,11 +565,7 @@ class SCTPStreamBase(InetTestBase):
class
Inet6TestBase
(
InetTestBase
):
"""Base class for IPv6 socket tests."""
# Don't use "localhost" here - it may not have an IPv6 address
# assigned to it by default (e.g. in /etc/hosts), and if someone
# has assigned it an IPv4-mapped address, then it's unlikely to
# work with the full IPv6 API.
host
=
"::1"
host
=
support
.
HOSTv6
class
UDP6TestBase
(
Inet6TestBase
):
"""Base class for UDP-over-IPv6 tests."""
...
...
@@ -1321,9 +1317,9 @@ class GeneralModuleTests(unittest.TestCase):
@unittest.skipUnless
(
support
.
IPV6_ENABLED
,
'IPv6 required for this test.'
)
def
test_flowinfo
(
self
):
self
.
assertRaises
(
OverflowError
,
socket
.
getnameinfo
,
(
'::1'
,
0
,
0xffffffff
),
0
)
(
support
.
HOSTv6
,
0
,
0xffffffff
),
0
)
with
socket
.
socket
(
socket
.
AF_INET6
,
socket
.
SOCK_STREAM
)
as
s
:
self
.
assertRaises
(
OverflowError
,
s
.
bind
,
(
'::1'
,
0
,
-
10
))
self
.
assertRaises
(
OverflowError
,
s
.
bind
,
(
support
.
HOSTv6
,
0
,
-
10
))
@unittest.skipUnless
(
HAVE_SOCKET_CAN
,
'SocketCan required for this test.'
)
...
...
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