diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2014-02-20 20:59:38 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2014-02-20 20:59:38 (GMT) |
commit | a90e8edaea8761abf7c4820e01409b94a4044049 (patch) | |
tree | 07f3dcb46702ce3a7814c783b600517c482c8e84 /Lib/test/test_asyncio | |
parent | 35669ae77ef4c501f09b1620bd3137dd5931868c (diff) | |
download | cpython-a90e8edaea8761abf7c4820e01409b94a4044049.zip cpython-a90e8edaea8761abf7c4820e01409b94a4044049.tar.gz cpython-a90e8edaea8761abf7c4820e01409b94a4044049.tar.bz2 |
asyncio: _check_resolved_address() must also accept IPv6 without flow_info and
scope_id: (host, port).
Diffstat (limited to 'Lib/test/test_asyncio')
-rw-r--r-- | Lib/test/test_asyncio/test_events.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Lib/test/test_asyncio/test_events.py b/Lib/test/test_asyncio/test_events.py index f8499dc..d00af23 100644 --- a/Lib/test/test_asyncio/test_events.py +++ b/Lib/test/test_asyncio/test_events.py @@ -1335,11 +1335,14 @@ class EventLoopTestsMixin: 'selector': self.loop._selector.__class__.__name__}) def test_sock_connect_address(self): - families = [(socket.AF_INET, ('www.python.org', 80))] + addresses = [(socket.AF_INET, ('www.python.org', 80))] if support.IPV6_ENABLED: - families.append((socket.AF_INET6, ('www.python.org', 80, 0, 0))) + addresses.extend(( + (socket.AF_INET6, ('www.python.org', 80)), + (socket.AF_INET6, ('www.python.org', 80, 0, 0)), + )) - for family, address in families: + for family, address in addresses: for sock_type in (socket.SOCK_STREAM, socket.SOCK_DGRAM): sock = socket.socket(family, sock_type) with sock: |