From 86c54f0955690b560aa1f4bf23074d7256b5c447 Mon Sep 17 00:00:00 2001 From: Ezio Melotti Date: Fri, 20 May 2011 14:13:58 +0300 Subject: Fix several ResourceWarnings in test_packaging. --- Lib/packaging/tests/pypi_server.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Lib/packaging/tests/pypi_server.py b/Lib/packaging/tests/pypi_server.py index cc5fcca..1e4b012 100644 --- a/Lib/packaging/tests/pypi_server.py +++ b/Lib/packaging/tests/pypi_server.py @@ -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): -- cgit v0.12