summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Curtin <brian.curtin@gmail.com>2010-10-31 00:34:23 (GMT)
committerBrian Curtin <brian.curtin@gmail.com>2010-10-31 00:34:23 (GMT)
commit61d0d60e13d4abf0abe85462c648586d53959711 (patch)
tree8f2fab997e4f2ce0765aeae06b67579eff11ddd6
parent076623bf0a2f50417059b736d8d378efa2059c95 (diff)
downloadcpython-61d0d60e13d4abf0abe85462c648586d53959711.zip
cpython-61d0d60e13d4abf0abe85462c648586d53959711.tar.gz
cpython-61d0d60e13d4abf0abe85462c648586d53959711.tar.bz2
Fix ResourceWarning for an unclosed socket.
test_return_header_keep_alive - Added a cleanup call for the socket.
-rw-r--r--Lib/test/test_httpservers.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/test/test_httpservers.py b/Lib/test/test_httpservers.py
index ddb50dc..daf37b2 100644
--- a/Lib/test/test_httpservers.py
+++ b/Lib/test/test_httpservers.py
@@ -182,6 +182,7 @@ class BaseHTTPServerTestCase(BaseTestCase):
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', '/')