From 3beb38f8ffe7b54e3372bc43385e9d5b8de1b6df Mon Sep 17 00:00:00 2001 From: Brian Curtin Date: Thu, 4 Nov 2010 03:41:43 +0000 Subject: Fix three ResourceWarnings. Mimic the clientTearDown from ThreadedTCPSocketTest, closing the socket. --- Lib/test/test_socket.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py index 704d46e..facb065 100644 --- a/Lib/test/test_socket.py +++ b/Lib/test/test_socket.py @@ -197,6 +197,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. -- cgit v0.12