Fix several ResourceWarnings in test_packaging.

This commit is contained in:
Ezio Melotti 2011-05-20 14:13:58 +03:00
parent ba8ef7a81d
commit 86c54f0955
1 changed files with 6 additions and 1 deletions

View File

@ -78,7 +78,12 @@ class PyPIServerTestCase(unittest.TestCase):
super(PyPIServerTestCase, self).setUp()
self.pypi = PyPIServer()
self.pypi.start()
self.addCleanup(self.pypi.stop)
def tearDown(self):
super(PyPIServerTestCase, self).tearDown()
self.pypi.stop()
self.pypi.join()
self.pypi.server.server_close()
class PyPIServer(threading.Thread):