summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2011-05-20 20:27:54 +0300
committerEzio Melotti <ezio.melotti@gmail.com>2011-05-20 20:27:54 +0300
commitbb00976fbf26f29ab72eeb6afc2d7b4fa1944965 (patch)
treea2ebe6bce133c55c07fbda3f23cf36ea0b228c73
parent2ed7521e9635abd28fdef0fec1b6773f85ff2af6 (diff)
downloadcpython-git-bb00976fbf26f29ab72eeb6afc2d7b4fa1944965.tar.gz
Fix another ResourceWarning in test_packaging.
-rw-r--r--Lib/packaging/tests/pypi_server.py3
-rw-r--r--Lib/packaging/tests/test_pypi_simple.py1
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"""