summaryrefslogtreecommitdiff
path: root/Lib/test/test_socket.py
diff options
context:
space:
mode:
authorBerker Peksag <berker.peksag@gmail.com>2016-06-18 16:10:07 +0300
committerBerker Peksag <berker.peksag@gmail.com>2016-06-18 16:10:07 +0300
commitc2faca749811c7a4ff11ccb38ca3c3c89878a584 (patch)
treed3f7731574164b71d51a66bac272bb63ba94eb69 /Lib/test/test_socket.py
parentaa5917621aec9bd5326910ecf3222ef447d34123 (diff)
downloadcpython-c2faca749811c7a4ff11ccb38ca3c3c89878a584.tar.gz
Issue #26536: Skip test_sio_loopback_fast_path under Windows 7
Diffstat (limited to 'Lib/test/test_socket.py')
-rw-r--r--Lib/test/test_socket.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
index fa318b3aae..faacd61fc1 100644
--- a/Lib/test/test_socket.py
+++ b/Lib/test/test_socket.py
@@ -1223,10 +1223,16 @@ class GeneralModuleTests(unittest.TestCase):
def test_sio_loopback_fast_path(self):
s = socket.socket()
self.addCleanup(s.close)
- s.ioctl(socket.SIO_LOOPBACK_FAST_PATH, True)
+ try:
+ s.ioctl(socket.SIO_LOOPBACK_FAST_PATH, True)
+ except OSError as exc:
+ WSAEOPNOTSUPP = 10045
+ if exc.winerror == WSAEOPNOTSUPP:
+ self.skipTest("SIO_LOOPBACK_FAST_PATH is defined but "
+ "doesn't implemented in this Windows version")
+ raise
self.assertRaises(TypeError, s.ioctl, socket.SIO_LOOPBACK_FAST_PATH, None)
-
def testGetaddrinfo(self):
try:
socket.getaddrinfo('localhost', 80)