[Python-checkins] cpython: Fix another ResourceWarning in test_packaging.
ezio.melotti
python-checkins at python.org
Fri May 20 19:28:10 CEST 2011
http://hg.python.org/cpython/rev/c46ecdbd217d
changeset: 70237:c46ecdbd217d
user: Ezio Melotti <ezio.melotti at gmail.com>
date: Fri May 20 20:27:54 2011 +0300
summary:
Fix another ResourceWarning in test_packaging.
files:
Lib/packaging/tests/pypi_server.py | 3 ++-
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
--- a/Lib/packaging/tests/pypi_server.py
+++ b/Lib/packaging/tests/pypi_server.py
@@ -149,7 +149,8 @@
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
--- a/Lib/packaging/tests/test_pypi_simple.py
+++ b/Lib/packaging/tests/test_pypi_simple.py
@@ -233,6 +233,7 @@
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"""
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list