diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2011-05-20 17:27:54 (GMT) |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2011-05-20 17:27:54 (GMT) |
commit | bb00976fbf26f29ab72eeb6afc2d7b4fa1944965 (patch) | |
tree | a2ebe6bce133c55c07fbda3f23cf36ea0b228c73 | |
parent | 2ed7521e9635abd28fdef0fec1b6773f85ff2af6 (diff) | |
download | cpython-bb00976fbf26f29ab72eeb6afc2d7b4fa1944965.zip cpython-bb00976fbf26f29ab72eeb6afc2d7b4fa1944965.tar.gz cpython-bb00976fbf26f29ab72eeb6afc2d7b4fa1944965.tar.bz2 |
Fix another ResourceWarning in test_packaging.
-rw-r--r-- | Lib/packaging/tests/pypi_server.py | 3 | ||||
-rw-r--r-- | Lib/packaging/tests/test_pypi_simple.py | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/Lib/packaging/tests/pypi_server.py b/Lib/packaging/tests/pypi_server.py index d22f5c3..6a72afb 100644 --- a/Lib/packaging/tests/pypi_server.py +++ b/Lib/packaging/tests/pypi_server.py @@ -149,7 +149,8 @@ class PyPIServer(threading.Thread): def stop(self): """self shutdown is not supported for python < 2.6""" self._run = False - self.join() + if self.is_alive(): + self.join() self.server.server_close() def get_next_response(self): diff --git a/Lib/packaging/tests/test_pypi_simple.py b/Lib/packaging/tests/test_pypi_simple.py index c43a839..6f0d8d9 100644 --- a/Lib/packaging/tests/test_pypi_simple.py +++ b/Lib/packaging/tests/test_pypi_simple.py @@ -233,6 +233,7 @@ class SimpleCrawlerTestCase(TempdirManager, self.assertEqual(4, len(crawler.get_releases("foo"))) finally: mirror.stop() + server.stop() def test_simple_link_matcher(self): # Test that the simple link matcher finds the right links""" |