]> granicus.if.org Git - python/commitdiff
Merged revisions 75838 via svnmerge from
authorAntoine Pitrou <solipsis@pitrou.net>
Tue, 27 Oct 2009 18:52:30 +0000 (18:52 +0000)
committerAntoine Pitrou <solipsis@pitrou.net>
Tue, 27 Oct 2009 18:52:30 +0000 (18:52 +0000)
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r75838 | antoine.pitrou | 2009-10-27 19:50:52 +0100 (mar., 27 oct. 2009) | 3 lines

  (Hopefully) suppress transient refleaks in test_httpservers.
........

Lib/test/test_httpservers.py

index 9a3d2049594bffa6808fb531d9f33ac3e84c5543..93a6dedb1c04a5a51d37e325bfff15be7517b69f 100644 (file)
@@ -51,6 +51,7 @@ class TestServerThread(threading.Thread):
 
 class BaseTestCase(unittest.TestCase):
     def setUp(self):
+        self._threads = support.threading_setup()
         os.environ = support.EnvironmentVarGuard()
         self.lock = threading.Lock()
         self.thread = TestServerThread(self, self.request_handler)
@@ -61,6 +62,7 @@ class BaseTestCase(unittest.TestCase):
         self.lock.release()
         self.thread.stop()
         os.environ.__exit__()
+        support.threading_cleanup(*self._threads)
 
     def request(self, uri, method='GET', body=None, headers={}):
         self.connection = http.client.HTTPConnection('localhost', self.PORT)