diff options
author | Brian Curtin <brian.curtin@gmail.com> | 2010-10-31 00:34:23 (GMT) |
---|---|---|
committer | Brian Curtin <brian.curtin@gmail.com> | 2010-10-31 00:34:23 (GMT) |
commit | 61d0d60e13d4abf0abe85462c648586d53959711 (patch) | |
tree | 8f2fab997e4f2ce0765aeae06b67579eff11ddd6 /Lib/test/test_httpservers.py | |
parent | 076623bf0a2f50417059b736d8d378efa2059c95 (diff) | |
download | cpython-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.
Diffstat (limited to 'Lib/test/test_httpservers.py')
-rw-r--r-- | Lib/test/test_httpservers.py | 1 |
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', '/') |