]> granicus.if.org Git - python/commitdiff
Issue #9868: locale was left changed after TestEnUSCollation#setUp raised
authorHirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp>
Thu, 23 Sep 2010 15:20:15 +0000 (15:20 +0000)
committerHirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp>
Thu, 23 Sep 2010 15:20:15 +0000 (15:20 +0000)
TestSkip exception.

Lib/test/test_locale.py

index 6cdb67ba65d325b07afe8a2f589020d9b993e0c7..e959343cca59114d86fc74295d3963cd73a01bd7 100644 (file)
@@ -352,13 +352,13 @@ class TestEnUSCollation(BaseLocalizedTest, TestCollation):
     locale_type = locale.LC_ALL
 
     def setUp(self):
-        BaseLocalizedTest.setUp(self)
         enc = codecs.lookup(locale.getpreferredencoding(False) or 'ascii').name
         if enc not in ('utf-8', 'iso8859-1', 'cp1252'):
             raise unittest.SkipTest('encoding not suitable')
         if enc != 'iso8859-1' and (sys.platform == 'darwin' or
                                    sys.platform.startswith('freebsd')):
             raise unittest.SkipTest('wcscoll/wcsxfrm have known bugs')
+        BaseLocalizedTest.setUp(self)
 
     def test_strcoll_with_diacritic(self):
         self.assertLess(locale.strcoll('à', 'b'), 0)