summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_socket.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2013-11-10 19:05:38 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2013-11-10 19:05:38 (GMT)
commit74af9d3cc432373ab83449eff9b3ee40a4d8d878 (patch)
tree5cfe8882fcaf23a08ca8e7cb21036699e1f2fb01 /Lib/test/test_socket.py
parent81895f8ee327474b5a07a12e957b786510227b29 (diff)
parent72cd8b9eda9c66c4883bb43855e8107d29e6d7d0 (diff)
downloadcpython-74af9d3cc432373ab83449eff9b3ee40a4d8d878.zip
cpython-74af9d3cc432373ab83449eff9b3ee40a4d8d878.tar.gz
cpython-74af9d3cc432373ab83449eff9b3ee40a4d8d878.tar.bz2
Merge heads
Diffstat (limited to 'Lib/test/test_socket.py')
-rw-r--r--Lib/test/test_socket.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
index beff31a..a7c2516 100644
--- a/Lib/test/test_socket.py
+++ b/Lib/test/test_socket.py
@@ -980,6 +980,14 @@ class GeneralModuleTests(unittest.TestCase):
return
except ImportError:
return
+
+ if sys.platform == "win32":
+ try:
+ inet_pton(AF_INET6, '::')
+ except OSError as e:
+ if e.winerror == 10022:
+ return # IPv6 might not be installed on this PC
+
f = lambda a: inet_pton(AF_INET6, a)
assertInvalid = lambda a: self.assertRaises(
(OSError, ValueError), f, a
@@ -1058,6 +1066,14 @@ class GeneralModuleTests(unittest.TestCase):
return
except ImportError:
return
+
+ if sys.platform == "win32":
+ try:
+ inet_ntop(AF_INET6, b'\x00' * 16)
+ except OSError as e:
+ if e.winerror == 10022:
+ return # IPv6 might not be installed on this PC
+
f = lambda a: inet_ntop(AF_INET6, a)
assertInvalid = lambda a: self.assertRaises(
(OSError, ValueError), f, a