Kaydet (Commit) 85bd5879 authored tarafından Antoine Pitrou's avatar Antoine Pitrou

(Hopefully) suppress transient refleaks in test_httpservers.

üst f829d1f5
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment