diff options
author | Brian Curtin <brian.curtin@gmail.com> | 2010-11-05 15:52:20 (GMT) |
---|---|---|
committer | Brian Curtin <brian.curtin@gmail.com> | 2010-11-05 15:52:20 (GMT) |
commit | 91a5b818e0b1a24e8c5775922441648fc50f73ef (patch) | |
tree | 7a22f57283c04fe5e1f7accc2c19d0c328d58abc /Lib/test/test_socket.py | |
parent | 4b4fa2118327fc9d2e3cd7e756a773961b3e0222 (diff) | |
download | cpython-91a5b818e0b1a24e8c5775922441648fc50f73ef.zip cpython-91a5b818e0b1a24e8c5775922441648fc50f73ef.tar.gz cpython-91a5b818e0b1a24e8c5775922441648fc50f73ef.tar.bz2 |
Merged revisions 86205 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r86205 | brian.curtin | 2010-11-05 10:47:45 -0500 (Fri, 05 Nov 2010) | 2 lines
Add socket cleanup for ResourceWarning and update test to use skip decorator
........
Diffstat (limited to 'Lib/test/test_socket.py')
-rw-r--r-- | Lib/test/test_socket.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py index 00bf948..a3c1d98 100644 --- a/Lib/test/test_socket.py +++ b/Lib/test/test_socket.py @@ -571,15 +571,15 @@ class GeneralModuleTests(unittest.TestCase): finally: sock.close() + @unittest.skipUnless(os.name == "nt", "Windows specific") def test_sock_ioctl(self): - if os.name != "nt": - return self.assertTrue(hasattr(socket.socket, 'ioctl')) self.assertTrue(hasattr(socket, 'SIO_RCVALL')) self.assertTrue(hasattr(socket, 'RCVALL_ON')) self.assertTrue(hasattr(socket, 'RCVALL_OFF')) self.assertTrue(hasattr(socket, 'SIO_KEEPALIVE_VALS')) s = socket.socket() + self.addCleanup(s.close) self.assertRaises(ValueError, s.ioctl, -1, None) s.ioctl(socket.SIO_KEEPALIVE_VALS, (1, 100, 100)) |