]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
get_build_version() is needed even where sys.platform != "win32".
authorHirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp>
Mon, 13 Sep 2010 07:18:30 +0000 (07:18 +0000)
committerHirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp>
Mon, 13 Sep 2010 07:18:30 +0000 (07:18 +0000)
Try to fix buildbot error in other way.

Lib/distutils/tests/test_msvc9compiler.py

index ec2b2e367ad1c155aa646a717ee210cd60e6dfc4..f1da843fab59c758a35311857a4de122759c1c8a 100644 (file)
@@ -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):