summaryrefslogtreecommitdiff
path: root/Lib/test
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@microsoft.com>2016-06-17 12:52:18 -0700
committerSteve Dower <steve.dower@microsoft.com>2016-06-17 12:52:18 -0700
commitea93ac013dc0d69c3500f16105fb0f8ea94aba3f (patch)
tree3d43d0bf0c5468a679c4c4258b38badc3bf1107a /Lib/test
parent99d66f917a60ad556726b497a7d964e4b2ce109d (diff)
downloadcpython-git-ea93ac013dc0d69c3500f16105fb0f8ea94aba3f.tar.gz
Issue #26536: socket.ioctl now supports SIO_LOOPBACK_FAST_PATH. Patch by Daniel Stokes.
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_socket.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
index 1ddd6044b9..fa318b3aae 100644
--- a/Lib/test/test_socket.py
+++ b/Lib/test/test_socket.py
@@ -1217,6 +1217,16 @@ class GeneralModuleTests(unittest.TestCase):
self.assertRaises(ValueError, s.ioctl, -1, None)
s.ioctl(socket.SIO_KEEPALIVE_VALS, (1, 100, 100))
+ @unittest.skipUnless(os.name == "nt", "Windows specific")
+ @unittest.skipUnless(hasattr(socket, 'SIO_LOOPBACK_FAST_PATH'),
+ 'Loopback fast path support required for this test')
+ def test_sio_loopback_fast_path(self):
+ s = socket.socket()
+ self.addCleanup(s.close)
+ s.ioctl(socket.SIO_LOOPBACK_FAST_PATH, True)
+ self.assertRaises(TypeError, s.ioctl, socket.SIO_LOOPBACK_FAST_PATH, None)
+
+
def testGetaddrinfo(self):
try:
socket.getaddrinfo('localhost', 80)