New submission from Erik Bray <erik.m.b...@gmail.com>:

Several of the tests in test_c_locale_coercion (particularly 
LocaleCoercionTests._check_c_locale_coercion) tend to assume that the system 
default locale used when setting setlocale(category, "") and when all the 
relevant environment variables are empty/blank will be the "C"/"POSIX" locale.

While this is often true POSIX does not require this to be the case.  For 
example on Cygwin it already defaults to "C.UTF-8", so these tests fail because 
they assume the legacy coercion will be used, when it isn't (e.g. the LC_CTYPE 
environment variable does not get forced to "C.UTF-8").  In principle this can 
affect any platform, however, that chooses a different default.

----------
components: Tests
messages: 306019
nosy: erik.bray, ncoghlan
priority: normal
severity: normal
status: open
title: test_c_locale_coercion fails when the default LC_CTYPE != "C"
type: behavior
versions: Python 3.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32002>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to