Make test_localization tests execute on windows targets · Issue #46597 · pandas-dev/pandas (original) (raw)
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
from pandas._config.localization import get_locales
print(type(get_locales())) # NoneType
Issue Description
On windows machines locale -a
does not exist and therefore get_locales()
returns None
This may be an issue for locale-related test coverage on windows CI runners, because @_skip_if_only_one_locale
is always True
.
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
Replace this line with the output of pd.show_versions()