socket.ioctl is only available on Windows

This commit is contained in:
Christian Heimes 2008-01-04 15:48:06 +00:00
parent aee643b01f
commit a47b75b0a0
2 changed files with 14 additions and 1 deletions

View file

@ -9,6 +9,7 @@ import time
import thread, threading
import Queue
import sys
import os
import array
from weakref import proxy
import signal
@ -500,6 +501,15 @@ class GeneralModuleTests(unittest.TestCase):
self.assertEqual(sock.proto, 0)
sock.close()
def test_sock_ioctl(self):
if os.name != "nt":
return
self.assert_(hasattr(socket.socket, 'ioctl'))
self.assert_(hasattr(socket, 'SIO_RCVALL'))
self.assert_(hasattr(socket, 'RCVALL_ON'))
self.assert_(hasattr(socket, 'RCVALL_OFF'))
class BasicTCPTest(SocketConnectedTest):
def __init__(self, methodName='runTest'):