summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorHye-Shik Chang <hyeshik@gmail.com>2003-12-19 01:16:03 (GMT)
committerHye-Shik Chang <hyeshik@gmail.com>2003-12-19 01:16:03 (GMT)
commit8d2e08dcdf1519f0eff21aa63ce609a978e2dcf9 (patch)
tree27a8c6d3c89d35baf08c1c78faed57c30e514c66 /Lib
parent302e550403cb3c53d22c1e1974451ef51931d99c (diff)
downloadcpython-8d2e08dcdf1519f0eff21aa63ce609a978e2dcf9.zip
cpython-8d2e08dcdf1519f0eff21aa63ce609a978e2dcf9.tar.gz
cpython-8d2e08dcdf1519f0eff21aa63ce609a978e2dcf9.tar.bz2
Enable some unittests on FreeBSD.
test__locale: add typical POSIX-style full locale names. test_locale: use en_US.US-ASCII on FreeBSD.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test__locale.py3
-rw-r--r--Lib/test/test_locale.py7
2 files changed, 7 insertions, 3 deletions
diff --git a/Lib/test/test__locale.py b/Lib/test/test__locale.py
index 3d916e7..be1d2ba 100644
--- a/Lib/test/test__locale.py
+++ b/Lib/test/test__locale.py
@@ -10,7 +10,8 @@ candidate_locales = ['es_UY', 'fr_FR', 'fi_FI', 'es_CO', 'pt_PT', 'it_IT',
'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',
'bs_BA', 'fr_LU', 'kl_GL', 'fa_IR', 'de_BE', 'sv_SE', 'it_CH', 'uk_UA',
- 'eu_ES', 'vi_VN', 'af_ZA', 'nb_NO', 'en_DK', 'tg_TJ']
+ 'eu_ES', 'vi_VN', 'af_ZA', 'nb_NO', 'en_DK', 'tg_TJ',
+ 'es_ES.ISO8859-1', 'fr_FR.ISO8859-15', 'ru_RU.KOI8-R', 'ko_KR.eucKR']
saw_locale = 0
for loc in candidate_locales:
diff --git a/Lib/test/test_locale.py b/Lib/test/test_locale.py
index 87c66e9..9187c9e 100644
--- a/Lib/test/test_locale.py
+++ b/Lib/test/test_locale.py
@@ -6,9 +6,12 @@ if sys.platform == 'darwin':
raise TestSkipped("Locale support on MacOSX is minimal and cannot be tested")
oldlocale = locale.setlocale(locale.LC_NUMERIC)
-tloc = "en_US"
-if sys.platform[:3] == "win":
+if sys.platform.startswith("win"):
tloc = "en"
+elif sys.platform.startswith("freebsd"):
+ tloc = "en_US.US-ASCII"
+else:
+ tloc = "en_US"
try:
locale.setlocale(locale.LC_NUMERIC, tloc)