summaryrefslogtreecommitdiff
path: root/Lib/test/test_socket.py
diff options
context:
space:
mode:
authorSenthil Kumaran <orsenthil@gmail.com>2010-01-08 19:04:16 +0000
committerSenthil Kumaran <orsenthil@gmail.com>2010-01-08 19:04:16 +0000
commitce8e33a095030e7af94f58f9da196b240bdf0476 (patch)
treeb0ba50cbb6e85c6be6f6e6a870e4232be50a0f9c /Lib/test/test_socket.py
parent3ddc435af6873c6304058d7bcbcb19ee4fba7781 (diff)
downloadcpython-git-ce8e33a095030e7af94f58f9da196b240bdf0476.tar.gz
Reverting the Revision: 77368. I committed Flox's big patch for tests by
mistake. ( It may come in for sure tough)
Diffstat (limited to 'Lib/test/test_socket.py')
-rw-r--r--Lib/test/test_socket.py12
1 files changed, 4 insertions, 8 deletions
diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
index b4f37eb2a6..faa06c5a8d 100644
--- a/Lib/test/test_socket.py
+++ b/Lib/test/test_socket.py
@@ -123,7 +123,7 @@ class ThreadableTest:
self.server_ready.wait()
self.client_ready.set()
self.clientSetUp()
- if not hasattr(test_func, '__call__'):
+ if not callable(test_func):
raise TypeError, "test_func must be a callable function"
try:
test_func()
@@ -282,7 +282,7 @@ class GeneralModuleTests(unittest.TestCase):
orig = sys.getrefcount(__name__)
socket.getnameinfo(__name__,0)
except TypeError:
- if sys.getrefcount(__name__) != orig:
+ if sys.getrefcount(__name__) <> orig:
self.fail("socket.getnameinfo loses a reference")
def testInterpreterCrash(self):
@@ -1234,9 +1234,7 @@ class BufferIOTest(SocketConnectedTest):
self.assertEqual(msg, MSG)
def _testRecvInto(self):
- # Silence Py3k warning
- with test_support.check_warnings():
- buf = buffer(MSG)
+ buf = buffer(MSG)
self.serv_conn.send(buf)
def testRecvFromInto(self):
@@ -1247,9 +1245,7 @@ class BufferIOTest(SocketConnectedTest):
self.assertEqual(msg, MSG)
def _testRecvFromInto(self):
- # Silence Py3k warning
- with test_support.check_warnings():
- buf = buffer(MSG)
+ buf = buffer(MSG)
self.serv_conn.send(buf)