summaryrefslogtreecommitdiff
path: root/Lib
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-12-09 01:20:03 +0100
committerVictor Stinner <victor.stinner@haypocalc.com>2011-12-09 01:20:03 +0100
commite86da7fe7fcac0ce23c09c46a7cc929ee5e63a3e (patch)
tree6502b00b19cf49a913d0ec9691d5911bdb98900e /Lib
parent28b4d09e08a2f98dc268ae0717923d142dc803a8 (diff)
downloadcpython-e86da7fe7fcac0ce23c09c46a7cc929ee5e63a3e.tar.gz
Issue #13441: Don't test the hu_HU locale on Solaris to workaround a mbstowcs()
bug. On Solaris, if the locale is hu_HU (and if the locale encoding is not UTF-8), the thousauds separator is b'\xA0' which is decoded as U+30000020 instead of U+0020 by mbstowcs().
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test__locale.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/Lib/test/test__locale.py b/Lib/test/test__locale.py
index 19bca68fd0..3217f7114b 100644
--- a/Lib/test/test__locale.py
+++ b/Lib/test/test__locale.py
@@ -17,7 +17,7 @@ if uname()[0] == "Darwin":
candidate_locales = ['es_UY', 'fr_FR', 'fi_FI', 'es_CO', 'pt_PT', 'it_IT',
'et_EE', 'es_PY', 'no_NO', 'nl_NL', 'lv_LV', 'el_GR', 'be_BY', 'fr_BE',
'ro_RO', 'ru_UA', 'ru_RU', 'es_VE', 'ca_ES', 'se_NO', 'es_EC', 'id_ID',
- 'ka_GE', 'es_CL', 'hu_HU', 'wa_BE', 'lt_LT', 'sl_SI', 'hr_HR', 'es_AR',
+ 'ka_GE', 'es_CL', 'wa_BE', 'lt_LT', 'sl_SI', 'hr_HR', 'es_AR',
'es_ES', 'oc_FR', 'gl_ES', 'bg_BG', 'is_IS', 'mk_MK', 'de_AT', 'pt_BR',
'da_DK', 'nn_NO', 'cs_CZ', 'de_LU', 'es_BO', 'sq_AL', 'sk_SK', 'fr_CH',
'de_DE', 'sr_YU', 'br_FR', 'nl_BE', 'sv_FI', 'pl_PL', 'fr_CA', 'fo_FO',
@@ -25,6 +25,13 @@ candidate_locales = ['es_UY', 'fr_FR', 'fi_FI', 'es_CO', 'pt_PT', 'it_IT',
'eu_ES', 'vi_VN', 'af_ZA', 'nb_NO', 'en_DK', 'tg_TJ', 'en_US',
'es_ES.ISO8859-1', 'fr_FR.ISO8859-15', 'ru_RU.KOI8-R', 'ko_KR.eucKR']
+# Issue #13441: Don't test the hu_HU locale on Solaris to workaround a
+# mbstowcs() bug. On Solaris, if the locale is hu_HU (and if the locale
+# encoding is not UTF-8), the thousauds separator is b'\xA0' which is decoded
+# as U+30000020 instead of U+0020 by mbstowcs().
+if sys.platform != 'sunos5':
+ candidate_locales.append('hu_HU')
+
# Workaround for MSVC6(debug) crash bug
if "MSC v.1200" in sys.version:
def accept(loc):