mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Issue #9868: locale was left changed after TestEnUSCollation#setUp raised
TestSkip exception.
This commit is contained in:
parent
5a7a52fbb0
commit
b3b390d7b3
1 changed files with 1 additions and 1 deletions
|
@ -352,13 +352,13 @@ class TestEnUSCollation(BaseLocalizedTest, TestCollation):
|
||||||
locale_type = locale.LC_ALL
|
locale_type = locale.LC_ALL
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
BaseLocalizedTest.setUp(self)
|
|
||||||
enc = codecs.lookup(locale.getpreferredencoding(False) or 'ascii').name
|
enc = codecs.lookup(locale.getpreferredencoding(False) or 'ascii').name
|
||||||
if enc not in ('utf-8', 'iso8859-1', 'cp1252'):
|
if enc not in ('utf-8', 'iso8859-1', 'cp1252'):
|
||||||
raise unittest.SkipTest('encoding not suitable')
|
raise unittest.SkipTest('encoding not suitable')
|
||||||
if enc != 'iso8859-1' and (sys.platform == 'darwin' or
|
if enc != 'iso8859-1' and (sys.platform == 'darwin' or
|
||||||
sys.platform.startswith('freebsd')):
|
sys.platform.startswith('freebsd')):
|
||||||
raise unittest.SkipTest('wcscoll/wcsxfrm have known bugs')
|
raise unittest.SkipTest('wcscoll/wcsxfrm have known bugs')
|
||||||
|
BaseLocalizedTest.setUp(self)
|
||||||
|
|
||||||
def test_strcoll_with_diacritic(self):
|
def test_strcoll_with_diacritic(self):
|
||||||
self.assertLess(locale.strcoll('à', 'b'), 0)
|
self.assertLess(locale.strcoll('à', 'b'), 0)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue