Skip to content

Commit 2898eb9

Browse files
committed
Oops, and now fix also the unit test for IPv6 address: test_sock_connect_address()
1 parent 2b87096 commit 2898eb9

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

tests/test_events.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1335,12 +1335,11 @@ def wait():
13351335
'selector': self.loop._selector.__class__.__name__})
13361336

13371337
def test_sock_connect_address(self):
1338-
families = [socket.AF_INET]
1338+
families = [(socket.AF_INET, ('www.python.org', 80))]
13391339
if support.IPV6_ENABLED:
1340-
families.append(socket.AF_INET6)
1340+
families.append((socket.AF_INET6, ('www.python.org', 80, 0, 0)))
13411341

1342-
address = ('www.python.org', 80)
1343-
for family in families:
1342+
for family, address in families:
13441343
for sock_type in (socket.SOCK_STREAM, socket.SOCK_DGRAM):
13451344
sock = socket.socket(family, sock_type)
13461345
with sock:

0 commit comments

Comments
 (0)