[Python-checkins] cpython: Fix test_asyncio/test_events.py: skip IPv6 if IPv6 is disabled on the host
victor.stinner
python-checkins at python.org
Thu Feb 13 10:47:30 CET 2014
http://hg.python.org/cpython/rev/3b0a1b3c0022
changeset: 89183:3b0a1b3c0022
user: Victor Stinner <victor.stinner at gmail.com>
date: Thu Feb 13 10:46:05 2014 +0100
summary:
Fix test_asyncio/test_events.py: skip IPv6 if IPv6 is disabled on the host
files:
Lib/test/test_asyncio/test_events.py | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/Lib/test/test_asyncio/test_events.py b/Lib/test/test_asyncio/test_events.py
--- a/Lib/test/test_asyncio/test_events.py
+++ b/Lib/test/test_asyncio/test_events.py
@@ -1192,8 +1192,12 @@
'selector': self.loop._selector.__class__.__name__})
def test_sock_connect_address(self):
+ families = [socket.AF_INET]
+ if support.IPV6_ENABLED:
+ families.append(socket.AF_INET6)
+
address = ('www.python.org', 80)
- for family in (socket.AF_INET, socket.AF_INET6):
+ for family in families:
for sock_type in (socket.SOCK_STREAM, socket.SOCK_DGRAM):
sock = socket.socket(family, sock_type)
with sock:
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list