mirror of
https://github.com/python/cpython.git
synced 2025-09-30 20:31:52 +00:00
asyncio: ops, and now fix also the unit test for IPv6 address:
test_sock_connect_address()
This commit is contained in:
parent
d1a727a9e5
commit
6dcfec9859
1 changed files with 3 additions and 4 deletions
|
@ -1335,12 +1335,11 @@ class EventLoopTestsMixin:
|
||||||
'selector': self.loop._selector.__class__.__name__})
|
'selector': self.loop._selector.__class__.__name__})
|
||||||
|
|
||||||
def test_sock_connect_address(self):
|
def test_sock_connect_address(self):
|
||||||
families = [socket.AF_INET]
|
families = [(socket.AF_INET, ('www.python.org', 80))]
|
||||||
if support.IPV6_ENABLED:
|
if support.IPV6_ENABLED:
|
||||||
families.append(socket.AF_INET6)
|
families.append((socket.AF_INET6, ('www.python.org', 80, 0, 0)))
|
||||||
|
|
||||||
address = ('www.python.org', 80)
|
for family, address in families:
|
||||||
for family in families:
|
|
||||||
for sock_type in (socket.SOCK_STREAM, socket.SOCK_DGRAM):
|
for sock_type in (socket.SOCK_STREAM, socket.SOCK_DGRAM):
|
||||||
sock = socket.socket(family, sock_type)
|
sock = socket.socket(family, sock_type)
|
||||||
with sock:
|
with sock:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue