From: Brian Curtin Date: Tue, 2 Nov 2010 02:07:09 +0000 (+0000) Subject: Clean up ResourceWarnings due to unclosed sockets. X-Git-Tag: v3.2a4~184 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=21ebbb7d3918db6101c3c49ee04cac95d156003d;p=thirdparty%2FPython%2Fcpython.git Clean up ResourceWarnings due to unclosed sockets. --- diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py index e20364dca96a..704d46e67223 100644 --- a/Lib/test/test_socket.py +++ b/Lib/test/test_socket.py @@ -259,6 +259,7 @@ class GeneralModuleTests(unittest.TestCase): def test_repr(self): s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + self.addCleanup(s.close) self.assertTrue(repr(s).startswith("