summaryrefslogtreecommitdiffstats
path: root/Lib/test/test__locale.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-12-08 22:42:52 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-12-08 22:42:52 (GMT)
commit706141316a31384803be9207b6065e79c8c9889c (patch)
tree461bbed54d9525a93db198cad0567a4b4d256249 /Lib/test/test__locale.py
parent221ea5d931b957571e93f5c20a21ba635ade75fb (diff)
downloadcpython-706141316a31384803be9207b6065e79c8c9889c.zip
cpython-706141316a31384803be9207b6065e79c8c9889c.tar.gz
cpython-706141316a31384803be9207b6065e79c8c9889c.tar.bz2
Issue #13441: Log the locale when localeconv() fails
Diffstat (limited to 'Lib/test/test__locale.py')
-rw-r--r--Lib/test/test__locale.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/test/test__locale.py b/Lib/test/test__locale.py
index 3fadb57..19bca68 100644
--- a/Lib/test/test__locale.py
+++ b/Lib/test/test__locale.py
@@ -86,9 +86,13 @@ class _LocaleTests(unittest.TestCase):
setlocale(LC_CTYPE, loc)
except Error:
continue
+ try:
+ formatting = localeconv()
+ except Exception as err:
+ self.fail("localeconv() failed with %s locale: %s" % (loc, err))
for lc in ("decimal_point",
"thousands_sep"):
- self.numeric_tester('localeconv', localeconv()[lc], lc, loc)
+ self.numeric_tester('localeconv', formatting[lc], lc, loc)
@unittest.skipUnless(nl_langinfo, "nl_langinfo is not available")
def test_lc_numeric_basic(self):