summaryrefslogtreecommitdiff
path: root/Lib/test/test_socket.py
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2008-01-04 15:48:06 +0000
committerChristian Heimes <christian@cheimes.de>2008-01-04 15:48:06 +0000
commita47b75b0a0e2fc7ee396bb317cd601ecec96f923 (patch)
tree20f180ed64af3ae1ccba9d8adddf6089d069f56b /Lib/test/test_socket.py
parentaee643b01fe4cb3993efcc2e06639e5cbf684c94 (diff)
downloadcpython-git-a47b75b0a0e2fc7ee396bb317cd601ecec96f923.tar.gz
socket.ioctl is only available on Windows
Diffstat (limited to 'Lib/test/test_socket.py')
-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 3e2d04c682..8f69a40f0b 100644
--- a/Lib/test/test_socket.py
+++ b/Lib/test/test_socket.py
@@ -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'):