From: Victor Stinner Date: Thu, 8 Dec 2011 22:42:52 +0000 (+0100) Subject: Issue #13441: Log the locale when localeconv() fails X-Git-Tag: v3.3.0a1~660 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=706141316a31384803be9207b6065e79c8c9889c;p=thirdparty%2FPython%2Fcpython.git Issue #13441: Log the locale when localeconv() fails --- diff --git a/Lib/test/test__locale.py b/Lib/test/test__locale.py index 3fadb575f295..19bca68fd0a1 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):