Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7061413

Browse files
author
Victor Stinner
committed
Issue #13441: Log the locale when localeconv() fails
1 parent 221ea5d commit 7061413

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

Lib/test/test__locale.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,13 @@ def test_lc_numeric_localeconv(self):
8686
setlocale(LC_CTYPE, loc)
8787
except Error:
8888
continue
89+
try:
90+
formatting = localeconv()
91+
except Exception as err:
92+
self.fail("localeconv() failed with %s locale: %s" % (loc, err))
8993
for lc in ("decimal_point",
9094
"thousands_sep"):
91-
self.numeric_tester('localeconv', localeconv()[lc], lc, loc)
95+
self.numeric_tester('localeconv', formatting[lc], lc, loc)
9296

9397
@unittest.skipUnless(nl_langinfo, "nl_langinfo is not available")
9498
def test_lc_numeric_basic(self):

0 commit comments

Comments
 (0)