diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2014-12-31 14:48:52 -0500 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2014-12-31 14:48:52 -0500 |
commit | 04cf504041b38b85c8f2e9ffddda5897b2161e67 (patch) | |
tree | 9ddbfcd2c3bb5984431c6651136ac1ef988cb3cc /setuptools/tests/test_msvc9compiler.py | |
parent | 05dfef7ed54dba0f858115be441febc94b79010a (diff) | |
download | external_python_setuptools-04cf504041b38b85c8f2e9ffddda5897b2161e67.tar.gz external_python_setuptools-04cf504041b38b85c8f2e9ffddda5897b2161e67.tar.bz2 external_python_setuptools-04cf504041b38b85c8f2e9ffddda5897b2161e67.zip |
Use pytest importorskip for skip logic
Diffstat (limited to 'setuptools/tests/test_msvc9compiler.py')
-rw-r--r-- | setuptools/tests/test_msvc9compiler.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/setuptools/tests/test_msvc9compiler.py b/setuptools/tests/test_msvc9compiler.py index 8567aa58..27747512 100644 --- a/setuptools/tests/test_msvc9compiler.py +++ b/setuptools/tests/test_msvc9compiler.py @@ -17,6 +17,8 @@ import pytest # importing only setuptools should apply the patch __import__('setuptools') +pytest.importorskip("distutils.msvc9compiler") + class MockReg: """Mock for distutils.msvc9compiler.Reg. We patch it with an instance of this class that mocks out the @@ -90,10 +92,6 @@ def patch_env(**replacements): class TestMSVC9Compiler(unittest.TestCase): def test_find_vcvarsall_patch(self): - if not hasattr(distutils, 'msvc9compiler'): - # skip - return - mod_name = distutils.msvc9compiler.find_vcvarsall.__module__ assert mod_name == "setuptools.msvc9_support", "find_vcvarsall unpatched" |