aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--setuptools/tests/test_msvc.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/setuptools/tests/test_msvc.py b/setuptools/tests/test_msvc.py
index 9b5ffba0..ad96752d 100644
--- a/setuptools/tests/test_msvc.py
+++ b/setuptools/tests/test_msvc.py
@@ -83,10 +83,12 @@ class TestModulePatch:
with mock_reg():
assert find_vcvarsall(9.0) is None
- expected = distutils.errors.DistutilsPlatformError
- with pytest.raises(expected) as exc:
+ try:
query_vcvarsall(9.0)
- assert 'aka.ms/vcpython27' in str(exc)
+ except Exception as exc:
+ expected = distutils.errors.DistutilsPlatformError
+ assert isinstance(expected, exc)
+ assert 'aka.ms/vcpython27' in str(exc)
@pytest.yield_fixture
def user_preferred_setting(self):