MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_lc_numeric_nl_langinfo

Method test_lc_numeric_nl_langinfo

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

Source from the content-addressed store, hash-verified

139 @unittest.skipUnless(nl_langinfo, "nl_langinfo is not available")
140 @unittest.skipIf(support.linked_to_musl(), "musl libc issue, bpo-46390")
141 def test_lc_numeric_nl_langinfo(self):
142 # Test nl_langinfo against known values
143 tested = False
144 oldloc = setlocale(LC_CTYPE)
145 for loc in candidate_locales:
146 try:
147 setlocale(LC_NUMERIC, loc)
148 except Error:
149 continue
150 for li, lc in ((RADIXCHAR, "decimal_point"),
151 (THOUSEP, "thousands_sep")):
152 if self.numeric_tester('nl_langinfo', nl_langinfo(li), lc, loc):
153 tested = True
154 self.assertEqual(setlocale(LC_CTYPE), oldloc)
155 if not tested:
156 self.skipTest('no suitable locales')
157
158 @unittest.skipIf(support.linked_to_musl(), "musl libc issue, bpo-46390")
159 def test_lc_numeric_localeconv(self):

Callers

nothing calls this directly

Calls 4

numeric_testerMethod · 0.95
skipTestMethod · 0.80
setlocaleFunction · 0.50
assertEqualMethod · 0.45

Tested by

no test coverage detected