From 3593a64ed6755876702ce362e1dfc87849c0952b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 Jan 2015 12:09:27 -0500 Subject: Skip integration tests when one of the packages under test is already installed, as the installation will fail in that case. --- setuptools/tests/test_integration.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'setuptools/tests') 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. -- cgit v1.2.1