Skip to content

Commit

Permalink
Update tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
serhiy-storchaka committed Nov 18, 2024
1 parent 58aa66f commit 86822d8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Lib/test/test__locale.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ def test_alt_digits_nl_langinfo(self):
self.skipTest('no suitable locales')

@unittest.skipUnless(nl_langinfo, "nl_langinfo is not available")
@unittest.skipUnless(hasattr(locale, 'ERA'), "requires locale.ALT_DIGITS")
@unittest.skipUnless(hasattr(locale, 'ERA'), "requires locale.ERA")
@unittest.skipIf(
support.is_emscripten or support.is_wasi,
"musl libc issue on Emscripten, bpo-46390"
Expand All @@ -258,6 +258,9 @@ def test_era_nl_langinfo(self):
with self.subTest(locale=loc):
era = nl_langinfo(locale.ERA)
self.assertIsInstance(era, str)
if era:
self.assertEqual(era.count(':'), (era.count(';') + 1) * 5, era)

loc1 = loc.split('.', 1)[0]
if loc1 in known_era:
count, sample = known_era[loc1]
Expand Down

0 comments on commit 86822d8

Please sign in to comment.