diff Lib/test/test_httpservers.py @ 65789:2e1ad7121e29 2.7

Merged revisions 86006 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r86006 | brian.curtin | 2010-10-30 19:34:23 -0500 (Sat, 30 Oct 2010) | 3 lines Fix ResourceWarning for an unclosed socket. test_return_header_keep_alive - Added a cleanup call for the socket. ........
author Brian Curtin <brian.curtin@gmail.com>
date Sun, 31 Oct 2010 00:36:01 +0000
parents f11dc9404d11
children 2c429d8c5ee2
line wrap: on
line diff
--- a/Lib/test/test_httpservers.py	Sun Oct 31 00:08:27 2010 +0000
+++ b/Lib/test/test_httpservers.py	Sun Oct 31 00:36:01 2010 +0000
@@ -256,6 +256,7 @@
         res = self.con.getresponse()
         self.assertEqual(res.getheader('Connection'), 'keep-alive')
         self.con.request('TEST', '/')
+        self.addCleanup(self.con.close)
 
     def test_internal_key_error(self):
         self.con.request('KEYERROR', '/')