From: Hirokazu Yamamoto Date: Mon, 13 Sep 2010 07:18:30 +0000 (+0000) Subject: get_build_version() is needed even where sys.platform != "win32". X-Git-Tag: v3.2a3~288 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bea8ae794873485eef1b0c0c20b374df99858430;p=thirdparty%2FPython%2Fcpython.git get_build_version() is needed even where sys.platform != "win32". Try to fix buildbot error in other way. --- diff --git a/Lib/distutils/tests/test_msvc9compiler.py b/Lib/distutils/tests/test_msvc9compiler.py index ec2b2e367ad1..f1da843fab59 100644 --- a/Lib/distutils/tests/test_msvc9compiler.py +++ b/Lib/distutils/tests/test_msvc9compiler.py @@ -62,10 +62,14 @@ _CLEANED_MANIFEST = """\ 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") + if get_build_version()>=8.0: + SKIP_MESSAGE = None + else: + SKIP_MESSAGE = "These tests are only for MSVC8.0 or above" +else: + SKIP_MESSAGE = "These tests are only for win32" + +@unittest.skipUnless(SKIP_MESSAGE is None, SKIP_MESSAGE) class msvc9compilerTestCase(support.TempdirManager, unittest.TestCase):