MCPcopy Index your code
hub / github.com/python/cpython / test_lc_numeric_localeconv

Method test_lc_numeric_localeconv

Lib/test/test__locale.py:159–175  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

157
158 @unittest.skipIf(support.linked_to_musl(), "musl libc issue, bpo-46390")
159 def test_lc_numeric_localeconv(self):
160 # Test localeconv against known values
161 tested = False
162 oldloc = setlocale(LC_CTYPE)
163 for loc in candidate_locales:
164 try:
165 setlocale(LC_NUMERIC, loc)
166 except Error:
167 continue
168 formatting = localeconv()
169 for lc in ("decimal_point",
170 "thousands_sep"):
171 if self.numeric_tester('localeconv', formatting[lc], lc, loc):
172 tested = True
173 self.assertEqual(setlocale(LC_CTYPE), oldloc)
174 if not tested:
175 self.skipTest('no suitable locales')
176
177 @unittest.skipUnless(nl_langinfo, "nl_langinfo is not available")
178 def test_lc_numeric_basic(self):

Callers

nothing calls this directly

Calls 5

numeric_testerMethod · 0.95
setlocaleFunction · 0.85
localeconvFunction · 0.85
skipTestMethod · 0.80
assertEqualMethod · 0.45

Tested by

no test coverage detected