Skip to content
This repository was archived by the owner on Nov 23, 2017. It is now read-only.

Commit 23f4712

Browse files
committed
Fix test_events.py: skip IPv6 if IPv6 is disabled on the host
1 parent 66c6ed7 commit 23f4712

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/test_events.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1192,8 +1192,12 @@ def wait():
11921192
'selector': self.loop._selector.__class__.__name__})
11931193

11941194
def test_sock_connect_address(self):
1195+
families = [socket.AF_INET]
1196+
if support.IPV6_ENABLED:
1197+
families.append(socket.AF_INET6)
1198+
11951199
address = ('www.python.org', 80)
1196-
for family in (socket.AF_INET, socket.AF_INET6):
1200+
for family in families:
11971201
for sock_type in (socket.SOCK_STREAM, socket.SOCK_DGRAM):
11981202
sock = socket.socket(family, sock_type)
11991203
with sock:

0 commit comments

Comments
 (0)