]> granicus.if.org Git - python/commitdiff
Merged revisions 86151 via svnmerge from
authorBrian Curtin <brian.curtin@gmail.com>
Thu, 4 Nov 2010 03:49:29 +0000 (03:49 +0000)
committerBrian Curtin <brian.curtin@gmail.com>
Thu, 4 Nov 2010 03:49:29 +0000 (03:49 +0000)
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r86151 | brian.curtin | 2010-11-03 22:41:43 -0500 (Wed, 03 Nov 2010) | 3 lines

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

Lib/test/test_socket.py

index a467e0d1bd2c3172737e99e5aa53246702505ad5..98ba4df15b966c7aefb237e85b825d25d2751e72 100644 (file)
@@ -177,6 +177,11 @@ class ThreadedUDPSocketTest(SocketUDPTest, ThreadableTest):
     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.