From: Victor Stinner Date: Fri, 22 May 2026 19:31:12 +0000 (+0200) Subject: gh-149879: Fix test__locale on Cygwin (#150248) X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=00c80df8ccc18e9cd72596a37a275fd2e20f96cc;p=thirdparty%2FPython%2Fcpython.git gh-149879: Fix test__locale on Cygwin (#150248) On Cygwin with the LC_TIME locale "ja_JP", nl_langinfo(ALT_DIGITS) returns 101 items instead of 100. --- diff --git a/Lib/test/test__locale.py b/Lib/test/test__locale.py index 11b2c9545a1b..29a29ca0c650 100644 --- a/Lib/test/test__locale.py +++ b/Lib/test/test__locale.py @@ -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, ''),