(Hopefully) suppress transient refleaks in test_httpservers.
diff --git a/Lib/test/test_httpservers.py b/Lib/test/test_httpservers.py
index 3ec0140..87d5588 100644
--- a/Lib/test/test_httpservers.py
+++ b/Lib/test/test_httpservers.py
@@ -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)