diff Lib/test/test_socket.py @ 65925:8a5f0873d738

Fix three ResourceWarnings. Mimic the clientTearDown from ThreadedTCPSocketTest, closing the socket.
author Brian Curtin <brian.curtin@gmail.com>
date Thu, 04 Nov 2010 03:41:43 +0000
parents 889fd8ecbff4
children e213e465a2dc
line wrap: on
line diff
--- a/Lib/test/test_socket.py	Thu Nov 04 03:02:56 2010 +0000
+++ b/Lib/test/test_socket.py	Thu Nov 04 03:41:43 2010 +0000
@@ -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.