[Python-checkins] r86151 - python/branches/py3k/Lib/test/test_socket.py

brian.curtin python-checkins at python.org
Thu Nov 4 04:41:45 CET 2010


Author: brian.curtin
Date: Thu Nov  4 04:41:43 2010
New Revision: 86151

Log:
Fix three ResourceWarnings.
Mimic the clientTearDown from ThreadedTCPSocketTest, closing the socket.


Modified:
   python/branches/py3k/Lib/test/test_socket.py

Modified: python/branches/py3k/Lib/test/test_socket.py
==============================================================================
--- python/branches/py3k/Lib/test/test_socket.py	(original)
+++ python/branches/py3k/Lib/test/test_socket.py	Thu Nov  4 04:41:43 2010
@@ -197,6 +197,11 @@
     def clientSetUp(self):
         self.cli = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
 
+    def clientTearDown(self):
+        self.cli.close()
+        self.cli = None
+        ThreadableTest.clientTearDown(self)
+
 class SocketConnectedTest(ThreadedTCPSocketTest):
     """Socket tests for client-server connection.
 


More information about the Python-checkins mailing list