[Python-checkins] r86006 - python/branches/py3k/Lib/test/test_httpservers.py
brian.curtin
python-checkins at python.org
Sun Oct 31 02:34:23 CEST 2010
Author: brian.curtin
Date: Sun Oct 31 02:34:23 2010
New Revision: 86006
Log:
Fix ResourceWarning for an unclosed socket.
test_return_header_keep_alive - Added a cleanup call for the socket.
Modified:
python/branches/py3k/Lib/test/test_httpservers.py
Modified: python/branches/py3k/Lib/test/test_httpservers.py
==============================================================================
--- python/branches/py3k/Lib/test/test_httpservers.py (original)
+++ python/branches/py3k/Lib/test/test_httpservers.py Sun Oct 31 02:34:23 2010
@@ -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', '/')
More information about the Python-checkins
mailing list