From: Berker Peksag Date: Sat, 18 Jun 2016 13:10:07 +0000 (+0300) Subject: Issue #26536: Skip test_sio_loopback_fast_path under Windows 7 X-Git-Tag: v3.6.0a3~120 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ce4271a3e563ac101df1a559d8d3a3274c79fb9c;p=thirdparty%2FPython%2Fcpython.git Issue #26536: Skip test_sio_loopback_fast_path under Windows 7 --- diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py index fa318b3aaef3..faacd61fc104 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)