mirror of
https://github.com/python/cpython.git
synced 2025-08-27 04:05:34 +00:00
Issue #26536: socket.ioctl now supports SIO_LOOPBACK_FAST_PATH. Patch by Daniel Stokes.
This commit is contained in:
parent
99d66f917a
commit
ea93ac013d
6 changed files with 57 additions and 4 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue