From: Antoine Pitrou Date: Tue, 27 Oct 2009 18:50:52 +0000 (+0000) Subject: (Hopefully) suppress transient refleaks in test_httpservers. X-Git-Tag: v2.7a1~227 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=85bd5879b21c8dde3938c69945626bc405b5d4d3;p=python (Hopefully) suppress transient refleaks in test_httpservers. --- diff --git a/Lib/test/test_httpservers.py b/Lib/test/test_httpservers.py index 3ec014018b..87d558844c 100644 --- a/Lib/test/test_httpservers.py +++ b/Lib/test/test_httpservers.py @@ -50,6 +50,7 @@ class TestServerThread(threading.Thread): 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 @@ class BaseTestCase(unittest.TestCase): 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)