Commit 1ff0ee0b authored by Victor Stinner's avatar Victor Stinner

Fix test_asyncio/test_events.py: skip IPv6 if IPv6 is disabled on the host

parent 42279476
...@@ -1192,8 +1192,12 @@ class EventLoopTestsMixin: ...@@ -1192,8 +1192,12 @@ 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]
if support.IPV6_ENABLED:
families.append(socket.AF_INET6)
address = ('www.python.org', 80) address = ('www.python.org', 80)
for family in (socket.AF_INET, socket.AF_INET6): 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:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment