mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Fix ResourceWarning for an unclosed socket.
test_return_header_keep_alive - Added a cleanup call for the socket.
This commit is contained in:
parent
076623bf0a
commit
61d0d60e13
1 changed files with 1 additions and 0 deletions
|
@ -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', '/')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue