]> granicus.if.org Git - python/commitdiff
Fix several ResourceWarnings in test_packaging.
authorEzio Melotti <ezio.melotti@gmail.com>
Fri, 20 May 2011 11:13:58 +0000 (14:13 +0300)
committerEzio Melotti <ezio.melotti@gmail.com>
Fri, 20 May 2011 11:13:58 +0000 (14:13 +0300)
Lib/packaging/tests/pypi_server.py

index cc5fcca05eff9f253b89dcbe83af62eea281ae31..1e4b0120d9cc5f61e47aa5c6e6f1cb261da82eba 100644 (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):