From dfa59bff40dce47c485cdba1f28d1a8908e7e2be Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 26 Sep 2014 18:47:55 -0400 Subject: Skip tests if msvc9compiler isn't available. --- setuptools/tests/test_msvc9compiler.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'setuptools/tests/test_msvc9compiler.py') diff --git a/setuptools/tests/test_msvc9compiler.py b/setuptools/tests/test_msvc9compiler.py index 8f71c3d5..99afb10e 100644 --- a/setuptools/tests/test_msvc9compiler.py +++ b/setuptools/tests/test_msvc9compiler.py @@ -12,8 +12,6 @@ import tempfile import unittest import distutils.errors -import distutils.msvc9compiler - # importing only setuptools should apply the patch __import__('setuptools') @@ -63,6 +61,10 @@ class MockReg: class TestMSVC9Compiler(unittest.TestCase): def test_find_vcvarsall_patch(self): + if not hasattr(distutils, 'msvc9compiler'): + # skip + return + self.assertEqual( "setuptools.extension", distutils.msvc9compiler.find_vcvarsall.__module__, -- cgit v1.2.1