diff options
author | Hirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp> | 2010-09-13 05:48:30 (GMT) |
---|---|---|
committer | Hirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp> | 2010-09-13 05:48:30 (GMT) |
commit | 10f4f76b285f1972b1a84198b6d601c51bfc0d14 (patch) | |
tree | 28b7a7a8a8dffb0105d282f1d77e72cd002b47ca /Lib/distutils/tests | |
parent | ee258571b5a4163df9f65070b78aaaa6e72bf084 (diff) | |
download | cpython-10f4f76b285f1972b1a84198b6d601c51bfc0d14.zip cpython-10f4f76b285f1972b1a84198b6d601c51bfc0d14.tar.gz cpython-10f4f76b285f1972b1a84198b6d601c51bfc0d14.tar.bz2 |
Merged revisions 84753,84760 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r84753 | hirokazu.yamamoto | 2010-09-13 07:55:40 +0900 | 1 line
Issue #9313: Skips test_remove_visual_c_ref on old MSVC.
........
r84760 | hirokazu.yamamoto | 2010-09-13 14:36:21 +0900 | 1 line
Issue #9313: Use unittest.skipUnless to skip old MSVC.
........
Diffstat (limited to 'Lib/distutils/tests')
-rw-r--r-- | Lib/distutils/tests/test_msvc9compiler.py | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/Lib/distutils/tests/test_msvc9compiler.py b/Lib/distutils/tests/test_msvc9compiler.py index 8a908d9..ec2b2e3 100644 --- a/Lib/distutils/tests/test_msvc9compiler.py +++ b/Lib/distutils/tests/test_msvc9compiler.py @@ -60,7 +60,12 @@ _CLEANED_MANIFEST = """\ </dependency> </assembly>""" +if sys.platform=="win32": + from distutils.msvccompiler import get_build_version + @unittest.skipUnless(sys.platform=="win32", "These tests are only for win32") +@unittest.skipUnless(get_build_version()>=8.0, "These tests are only for" + " MSVC8.0 or above") class msvc9compilerTestCase(support.TempdirManager, unittest.TestCase): @@ -68,10 +73,6 @@ class msvc9compilerTestCase(support.TempdirManager, # makes sure query_vcvarsall throws # a DistutilsPlatformError if the compiler # is not found - from distutils.msvccompiler import get_build_version - if get_build_version() < 8.0: - # this test is only for MSVC8.0 or above - return from distutils.msvc9compiler import query_vcvarsall def _find_vcvarsall(version): return None @@ -86,11 +87,6 @@ class msvc9compilerTestCase(support.TempdirManager, msvc9compiler.find_vcvarsall = old_find_vcvarsall def test_reg_class(self): - from distutils.msvccompiler import get_build_version - if get_build_version() < 8.0: - # this test is only for MSVC8.0 or above - return - from distutils.msvc9compiler import Reg self.assertRaises(KeyError, Reg.get_value, 'xxx', 'xxx') |