diff options
author | Berker Peksag <berker.peksag@gmail.com> | 2016-06-18 13:10:07 (GMT) |
---|---|---|
committer | Berker Peksag <berker.peksag@gmail.com> | 2016-06-18 13:10:07 (GMT) |
commit | ce4271a3e563ac101df1a559d8d3a3274c79fb9c (patch) | |
tree | 1db9df8f92adbd29db2ba329ca390ad678169a84 /Lib/test/test_socket.py | |
parent | f95de0e8cc259b1ccb6b604a0ed74bb7894f4b2b (diff) | |
download | cpython-ce4271a3e563ac101df1a559d8d3a3274c79fb9c.zip cpython-ce4271a3e563ac101df1a559d8d3a3274c79fb9c.tar.gz cpython-ce4271a3e563ac101df1a559d8d3a3274c79fb9c.tar.bz2 |
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.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py index fa318b3..faacd61 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) |