]> granicus.if.org Git - python/commitdiff
Merged revisions 84765 via svnmerge from
authorHirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp>
Mon, 13 Sep 2010 08:14:41 +0000 (08:14 +0000)
committerHirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp>
Mon, 13 Sep 2010 08:14:41 +0000 (08:14 +0000)
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r84765 | hirokazu.yamamoto | 2010-09-13 16:18:30 +0900 | 2 lines

  get_build_version() is needed even where sys.platform != "win32".
  Try to fix buildbot error in other way.
........

Lib/distutils/tests/test_msvc9compiler.py

index cd162516cfe855c42247c547bfadce0864a19114..c95795448236568208b2a17ffe2420464ed2da8b 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):