diff Lib/test/test_httpservers.py @ 56870:269f1d9c86cd legacy-trunk

(Hopefully) suppress transient refleaks in test_httpservers.
author Antoine Pitrou <solipsis@pitrou.net>
date Tue, 27 Oct 2009 18:50:52 +0000
parents b818a7a70a47
children 07c7664f21a1
line wrap: on
line diff
--- a/Lib/test/test_httpservers.py	Tue Oct 27 18:36:47 2009 +0000
+++ b/Lib/test/test_httpservers.py	Tue Oct 27 18:50:52 2009 +0000
@@ -50,6 +50,7 @@
 
 class BaseTestCase(unittest.TestCase):
     def setUp(self):
+        self._threads = test_support.threading_setup()
         os.environ = test_support.EnvironmentVarGuard()
         self.lock = threading.Lock()
         self.thread = TestServerThread(self, self.request_handler)
@@ -60,6 +61,7 @@
         self.lock.release()
         self.thread.stop()
         os.environ.__exit__()
+        test_support.threading_cleanup(*self._threads)
 
     def request(self, uri, method='GET', body=None, headers={}):
         self.connection = httplib.HTTPConnection('localhost', self.PORT)