diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2015-01-04 12:09:27 -0500 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2015-01-04 12:09:27 -0500 |
commit | 3593a64ed6755876702ce362e1dfc87849c0952b (patch) | |
tree | b6296ad1b55fbcd95df375d4d6cf98354427db88 /setuptools/tests/test_integration.py | |
parent | 0a8b9a3152c736d8e2f8a01f5a9547546b907de7 (diff) | |
download | external_python_setuptools-3593a64ed6755876702ce362e1dfc87849c0952b.tar.gz external_python_setuptools-3593a64ed6755876702ce362e1dfc87849c0952b.tar.bz2 external_python_setuptools-3593a64ed6755876702ce362e1dfc87849c0952b.zip |
Skip integration tests when one of the packages under test is already installed, as the installation will fail in that case.
Diffstat (limited to 'setuptools/tests/test_integration.py')
-rw-r--r-- | setuptools/tests/test_integration.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/setuptools/tests/test_integration.py b/setuptools/tests/test_integration.py index 3a6abeaa..92a27080 100644 --- a/setuptools/tests/test_integration.py +++ b/setuptools/tests/test_integration.py @@ -14,6 +14,17 @@ 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 + + @pytest.fixture def install_context(request, tmpdir, monkeypatch): """Fixture to set up temporary installation directory. |