This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author lys.nikolaou
Recipients lys.nikolaou
Date 2020-10-31.22:39:36
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1604183976.7.0.233218767398.issue42224@roundup.psfhosted.org>
In-reply-to
Content
test_format:test_locale tests for the existence of the thousands separator in a formatted number.

However, my locale does not expect/enforce (not sure what the correct term is) grouping the number in thousands, which leads to the test (and consequently the whole test suite) failing:

➜  cpython git:(test-format-locale-fix) ./python                  
Python 3.10.0a1+ (heads/master:3bf0d02f28, Oct 31 2020, 22:42:09) 
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import locale
>>> locale.setlocale(locale.LC_ALL, '')
'LC_CTYPE=en_US.UTF-8;LC_NUMERIC=el_GR.UTF-8;LC_TIME=el_GR.UTF-8;LC_COLLATE=en_US.UTF-8;LC_MONETARY=el_GR.UTF-8;LC_MESSAGES=en_US.UTF-8;LC_PAPER=el_GR.UTF-8;LC_NAME=el_GR.UTF-8;LC_ADDRESS=el_GR.UTF-8;LC_TELEPHONE=el_GR.UTF-8;LC_MEASUREMENT=el_GR.UTF-8;LC_IDENTIFICATION=el_GR.UTF-8'
>>> format(123456789, 'n')
'123456789'
>>> locale.localeconv()['grouping']
[]

I guess the fix here is to check whether grouping is empty or not in test_locale.
History
Date User Action Args
2020-10-31 22:39:36lys.nikolaousetrecipients: + lys.nikolaou
2020-10-31 22:39:36lys.nikolaousetmessageid: <1604183976.7.0.233218767398.issue42224@roundup.psfhosted.org>
2020-10-31 22:39:36lys.nikolaoulinkissue42224 messages
2020-10-31 22:39:36lys.nikolaoucreate