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

Skip to content

Commit 0211ed3

Browse files
committed
asyncio: ops, and now fix also the unit test for IPv6 address:
test_sock_connect_address()
1 parent 013dece commit 0211ed3

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

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