Mercurial > cpython-lru_cache-weakref
diff Lib/test/test_httpservers.py @ 65788:211858723b8c
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:34:23 +0000 |
| parents | 40ac45a092b7 |
| children | 9717153d558d |
line wrap: on
line diff
--- a/Lib/test/test_httpservers.py Sun Oct 31 00:03:45 2010 +0000 +++ b/Lib/test/test_httpservers.py Sun Oct 31 00:34:23 2010 +0000 @@ -182,6 +182,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', '/')
