]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-149879: Fix test__locale on Cygwin (#150248)
authorVictor Stinner <vstinner@python.org>
Fri, 22 May 2026 19:31:12 +0000 (21:31 +0200)
committerGitHub <noreply@github.com>
Fri, 22 May 2026 19:31:12 +0000 (21:31 +0200)
On Cygwin with the LC_TIME locale "ja_JP", nl_langinfo(ALT_DIGITS)
returns 101 items instead of 100.

Lib/test/test__locale.py

index 11b2c9545a1b43d058514a426f1d5ce1732392ed..29a29ca0c65097409cfdc1fb2fcec577882af760 100644 (file)
@@ -89,6 +89,9 @@ known_alt_digits = {
     'ar_AE': (100, {0: '\u0660', 10: '\u0661\u0660', 99: '\u0669\u0669'}),
     'bn_IN': (100, {0: '\u09e6', 10: '\u09e7\u09e6', 99: '\u09ef\u09ef'}),
 }
+if sys.platform == 'cygwin':
+    count, samples = known_alt_digits['ja_JP']
+    known_alt_digits['ja_JP'] = (101, samples)
 
 known_era = {
     'C': (0, ''),