]> granicus.if.org Git - python/commitdiff
Fix more buildbot failures on test_locale.
authorAntoine Pitrou <solipsis@pitrou.net>
Sat, 26 Jul 2008 11:56:37 +0000 (11:56 +0000)
committerAntoine Pitrou <solipsis@pitrou.net>
Sat, 26 Jul 2008 11:56:37 +0000 (11:56 +0000)
Lib/test/test_locale.py

index edd534f28556bec458daca2b9c8a9b65443f40c3..57b7c72b892c50051f773c6fb54a5c3671ff1f49 100644 (file)
@@ -224,10 +224,10 @@ class TestCNumberFormatting(CCookedTest, BaseFormattingTest):
         self._test_format("%9.2f", 12345.67, grouping=True, out=' 12345.67')
 
 
-if sys.platform != 'sunos5':
-    class TestStringMethods(BaseLocalizedTest):
-        locale_type = locale.LC_CTYPE
+class TestStringMethods(BaseLocalizedTest):
+    locale_type = locale.LC_CTYPE
 
+    if sys.platform != 'sunos5' and not sys.platform.startswith("win"):
         # Test BSD Rune locale's bug for isctype functions.
 
         def test_isspace(self):
@@ -275,12 +275,17 @@ class TestMiscellaneous(unittest.TestCase):
 
 
 def test_main():
-    tests = [TestMiscellaneous, TestEnUSNumberFormatting, TestCNumberFormatting]
+    tests = [
+        TestMiscellaneous,
+        TestEnUSNumberFormatting,
+        TestCNumberFormatting
+    ]
     # TestSkipped can't be raised inside unittests, handle it manually instead
     try:
         get_enUS_locale()
     except TestSkipped as e:
-        print "Some tests will be disabled: %s" % e
+        if verbose:
+            print "Some tests will be disabled: %s" % e
     else:
         tests += [TestNumberFormatting, TestStringMethods]
     run_unittest(*tests)