summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2009-10-27 18:50:52 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2009-10-27 18:50:52 (GMT)
commit85bd5879b21c8dde3938c69945626bc405b5d4d3 (patch)
tree18dea728fafc378259d01551ef21cc4aeacba426
parentf829d1f551f75005d78dec303957808e7833964e (diff)
downloadcpython-85bd5879b21c8dde3938c69945626bc405b5d4d3.zip
cpython-85bd5879b21c8dde3938c69945626bc405b5d4d3.tar.gz
cpython-85bd5879b21c8dde3938c69945626bc405b5d4d3.tar.bz2
(Hopefully) suppress transient refleaks in test_httpservers.
-rw-r--r--Lib/test/test_httpservers.py2
1 files changed, 2 insertions, 0 deletions
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 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)