diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2011-05-20 20:27:54 +0300 |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2011-05-20 20:27:54 +0300 |
commit | bb00976fbf26f29ab72eeb6afc2d7b4fa1944965 (patch) | |
tree | a2ebe6bce133c55c07fbda3f23cf36ea0b228c73 | |
parent | 2ed7521e9635abd28fdef0fec1b6773f85ff2af6 (diff) | |
download | cpython-git-bb00976fbf26f29ab72eeb6afc2d7b4fa1944965.tar.gz |
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 d22f5c3ab7..6a72afbdca 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 c43a8390fc..6f0d8d9d7b 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""" |