summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-12-09 00:20:03 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-12-09 00:20:03 (GMT)
commit5446bba269cedee3b93aa27eabcf2a7842fb1298 (patch)
treecabe0c1379431453a70fd480e45f5f149ff9e39e /Lib/test
parent3459922c1b6625c038348d39f1d5efb497d477a9 (diff)
downloadcpython-5446bba269cedee3b93aa27eabcf2a7842fb1298.zip
cpython-5446bba269cedee3b93aa27eabcf2a7842fb1298.tar.gz
cpython-5446bba269cedee3b93aa27eabcf2a7842fb1298.tar.bz2
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/test')
-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 19bca68..3217f71 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):