mirror of https://github.com/python/cpython
Fix several ResourceWarnings in test_packaging.
This commit is contained in:
parent
ba8ef7a81d
commit
86c54f0955
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue