diff options
Diffstat (limited to 'setuptools/tests/test_integration.py')
-rw-r--r-- | setuptools/tests/test_integration.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/setuptools/tests/test_integration.py b/setuptools/tests/test_integration.py index 3a6abeaa..11a6ff5a 100644 --- a/setuptools/tests/test_integration.py +++ b/setuptools/tests/test_integration.py @@ -7,6 +7,8 @@ import glob import os import sys +from six.moves import urllib + import pytest from setuptools.command.easy_install import easy_install @@ -14,6 +16,22 @@ from setuptools.command import easy_install as easy_install_pkg from setuptools.dist import Distribution +def setup_module(module): + packages = 'stevedore', 'virtualenvwrapper', 'pbr', 'novaclient' + for pkg in packages: + try: + __import__(pkg) + tmpl = "Integration tests cannot run when {pkg} is installed" + pytest.skip(tmpl.format(**locals())) + except ImportError: + pass + + try: + urllib.request.urlopen('https://pypi.python.org/pypi') + except Exception as exc: + pytest.skip(str(exc)) + + @pytest.fixture def install_context(request, tmpdir, monkeypatch): """Fixture to set up temporary installation directory. |