]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
GH-126727: Fix test_era_nl_langinfo with Japanese ERAs on Solaris (GH-127327)
authorJakub Kulík <Kulikjak@gmail.com>
Thu, 5 Dec 2024 18:43:19 +0000 (19:43 +0100)
committerGitHub <noreply@github.com>
Thu, 5 Dec 2024 18:43:19 +0000 (20:43 +0200)
Fix test_era_nl_langinfo with Japanese ERAs on Solaris

Lib/test/test__locale.py

index 2c751033ebb3e230e8b27490d7a7faa2bbe5157b..cef84fd9580c3765c827b3e04185895eead80b58 100644 (file)
@@ -102,6 +102,11 @@ if sys.platform == 'win32':
     # ps_AF doesn't work on Windows: see bpo-38324 (msg361830)
     del known_numerics['ps_AF']
 
+if sys.platform == 'sunos5':
+    # On Solaris, Japanese ERAs start with the year 1927,
+    # and thus there's less of them.
+    known_era['ja_JP'] = (5, '+:1:2019/05/01:2019/12/31:令和:%EC元年')
+
 class _LocaleTests(unittest.TestCase):
 
     def setUp(self):