summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2006-02-19 00:13:15 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2006-02-19 00:13:15 (GMT)
commitbb459734550094e9ea85d327afe87dc179b59986 (patch)
tree3d0c2a898f253416063f3f1ce7fef6ec375c739d
parent1dc5a84aee510f966849d32263466a6ec9c3da0c (diff)
downloadcpython-bb459734550094e9ea85d327afe87dc179b59986.zip
cpython-bb459734550094e9ea85d327afe87dc179b59986.tar.gz
cpython-bb459734550094e9ea85d327afe87dc179b59986.tar.bz2
This fixes test _locale failing on macteagle (Mac OS 10.4 AFAIK).
Google for: eu_ES decimal point shows that BSD locales had the eu_ES decimal point as a single quote (') instead of a comma (,). This was seems to have been fixed 15 months ago, but it's not on our Mac and presumably others. So skip this broken locale.
-rw-r--r--Lib/test/test__locale.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/Lib/test/test__locale.py b/Lib/test/test__locale.py
index 8f2598f..9799f89 100644
--- a/Lib/test/test__locale.py
+++ b/Lib/test/test__locale.py
@@ -96,7 +96,6 @@ class _LocaleTests(unittest.TestCase):
nl_radixchar, li_radixchar,
loc, set_locale))
-
def test_float_parsing(self):
# Bug #1391872: Test whether float parsing is okay on European
# locales.
@@ -105,13 +104,16 @@ class _LocaleTests(unittest.TestCase):
setlocale(LC_NUMERIC, loc)
except Error:
continue
+
+ # Ignore buggy locale databases. (Mac OS 10.4 and some other BSDs)
+ if loc == 'eu_ES' and localeconv()['decimal_point'] == "' ":
+ continue
+
self.assertEquals(int(eval('3.14') * 100), 314,
"using eval('3.14') failed for %s" % loc)
self.assertEquals(int(float('3.14') * 100), 314,
"using float('3.14') failed for %s" % loc)
-
-
def test_main():
run_unittest(_LocaleTests)