Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1ff0ee0

Browse files
committed
Fix test_asyncio/test_events.py: skip IPv6 if IPv6 is disabled on the host
1 parent 4227947 commit 1ff0ee0

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

Lib/test/test_asyncio/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)