diff options
| author | Tarek Ziade <tarek@ziade.org> | 2011-05-22 22:41:27 (GMT) |
|---|---|---|
| committer | Tarek Ziade <tarek@ziade.org> | 2011-05-22 22:41:27 (GMT) |
| commit | e5f9cbdaae323e801862e8780826386132b58326 (patch) | |
| tree | 9d1a02a8409fd552644a4d8eea26981fccd90f82 /Lib/packaging/tests/test_pypi_dist.py | |
| parent | a3c1545a2e6ff890b014a405e2511581b557772e (diff) | |
| download | cpython-e5f9cbdaae323e801862e8780826386132b58326.zip cpython-e5f9cbdaae323e801862e8780826386132b58326.tar.gz cpython-e5f9cbdaae323e801862e8780826386132b58326.tar.bz2 | |
skip more tests in packaging if threading is not supported
Diffstat (limited to 'Lib/packaging/tests/test_pypi_dist.py')
| -rw-r--r-- | Lib/packaging/tests/test_pypi_dist.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Lib/packaging/tests/test_pypi_dist.py b/Lib/packaging/tests/test_pypi_dist.py index 108e723..b7f4e98 100644 --- a/Lib/packaging/tests/test_pypi_dist.py +++ b/Lib/packaging/tests/test_pypi_dist.py @@ -8,7 +8,11 @@ from packaging.pypi.errors import HashDoesNotMatch, UnsupportedHashName from packaging.tests import unittest from packaging.tests.support import TempdirManager, requires_zlib -from packaging.tests.pypi_server import use_pypi_server +try: + import threading + from packaging.tests.pypi_server import use_pypi_server +except ImportError: + threading = use_pypi_server = None def Dist(*args, **kwargs): @@ -120,6 +124,7 @@ class TestDistInfo(TempdirManager, unittest.TestCase): # assert we can't compare dists with different names self.assertRaises(TypeError, foo1.__eq__, bar) + @unittest.skipIf(threading is None, 'needs threading') @use_pypi_server("downloads_with_md5") def test_download(self, server): # Download is possible, and the md5 is checked if given @@ -158,6 +163,7 @@ class TestDistInfo(TempdirManager, unittest.TestCase): hashname="invalid_hashname", hashval="value") + @unittest.skipIf(threading is None, 'needs threading') @requires_zlib @use_pypi_server('downloads_with_md5') def test_unpack(self, server): |
