Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b3b390d

Browse files
author
Hirokazu Yamamoto
committed
Issue #9868: locale was left changed after TestEnUSCollation#setUp raised
TestSkip exception.
1 parent 5a7a52f commit b3b390d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/test/test_locale.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,13 +352,13 @@ class TestEnUSCollation(BaseLocalizedTest, TestCollation):
352352
locale_type = locale.LC_ALL
353353

354354
def setUp(self):
355-
BaseLocalizedTest.setUp(self)
356355
enc = codecs.lookup(locale.getpreferredencoding(False) or 'ascii').name
357356
if enc not in ('utf-8', 'iso8859-1', 'cp1252'):
358357
raise unittest.SkipTest('encoding not suitable')
359358
if enc != 'iso8859-1' and (sys.platform == 'darwin' or
360359
sys.platform.startswith('freebsd')):
361360
raise unittest.SkipTest('wcscoll/wcsxfrm have known bugs')
361+
BaseLocalizedTest.setUp(self)
362362

363363
def test_strcoll_with_diacritic(self):
364364
self.assertLess(locale.strcoll('à', 'b'), 0)

0 commit comments

Comments
 (0)