summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp>2010-09-13 07:18:30 +0000
committerHirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp>2010-09-13 07:18:30 +0000
commitc9bc9d98d8766b49eea3d8fbc084e9313094b94e (patch)
tree5f2581bd0497cc3735f2fac6368316d022c662be
parent50e74d1aefc924a81eb8a4ce26c7376b4c41c055 (diff)
downloadpython-setuptools-git-c9bc9d98d8766b49eea3d8fbc084e9313094b94e.tar.gz
get_build_version() is needed even where sys.platform != "win32".
Try to fix buildbot error in other way.
-rw-r--r--tests/test_msvc9compiler.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/test_msvc9compiler.py b/tests/test_msvc9compiler.py
index ec2b2e36..f1da843f 100644
--- a/tests/test_msvc9compiler.py
+++ b/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):