Open smarie opened 2 years ago
Oh I see that even when commenting out the decorator, the whole test_localization
module is marked as skipped still.
pytestmark = pytest.mark.skipif(
is_platform_windows() or not _all_locales, reason="Need non-Windows and locales"
)
So nevermind, the issue is broader and could be renamed "Make test_localization
tests execute on windows targets"
EDIT: See next post, this original issue about the
get_locale
returning an empty list on windows, has been extended to a broader one.Reproducible Example
On a windows platform
Issue Description
On windows machines
locale -a
does not exist and thereforeget_locales()
returnsNone
This may be an issue for locale-related test coverage on windows CI runners, because
@_skip_if_only_one_locale
is alwaysTrue
.I discovered this when I tried to execute
test_set_locale
on my machine and found out that it was not executing at all (all skipped!)Expected Behavior
A list of locale available should be returned. The solution might not be easy to find however :( See https://stackoverflow.com/questions/19709026/how-can-i-list-all-available-windows-locales-in-python-console
Workaround: I think that we can avoid fixing this, if we change
@_skip_if_only_one_locale
so that on windows runners it is less strict.Installed Versions