]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] GH-126727: Fix test_era_nl_langinfo with Japanese ERAs on Solaris (GH-127327...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 5 Dec 2024 19:01:25 +0000 (20:01 +0100)
committerGitHub <noreply@github.com>
Thu, 5 Dec 2024 19:01:25 +0000 (19:01 +0000)
(cherry picked from commit d958d9f4a1b71c6d30960bf6c53c41046ea94590)

Co-authored-by: Jakub Kulík <Kulikjak@gmail.com>
Lib/test/test__locale.py

index 89c203250557f0a67a0af57708aee82fd26a4127..606dd297452bc4e174556e06e116f556747f5a8c 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):