Skip to content

TST: Review if we are really testing with different locales #23923

Closed
@datapythonista

Description

@datapythonista

In the scripts for the CI, we set the locale with:

export LC_ALL="$LOCALE_OVERRIDE";
export LANG="$LOCALE_OVERRIDE";

and immediately later we display the locale detected by pandas:

pycmd='import pandas; print("pandas detected console encoding: %s" % pandas.get_option("display.encoding"))'
python -c "$pycmd"

(see https://github.com/pandas-dev/pandas/blob/master/ci/script_single.sh#L5)

Checking the logs, I can see how in the two builds where we specify locales, the output is:

# Linux py37_locale
2018-11-25T20:35:30.0051096Z Setting LC_ALL and LANG to zh_CN.UTF-8
2018-11-25T20:35:31.0423116Z pandas detected console encoding: UTF-8

and

# Linux py36_locale_slow
2018-11-25T20:37:45.3938178Z Setting LC_ALL and LANG to it_IT.UTF-8
2018-11-25T20:37:46.4791772Z pandas detected console encoding: UTF-8

And also in Travis:

# 2.7, locale, slow, old NumPy
Setting LC_ALL and LANG to zh_CN.UTF-8
pandas detected console encoding: UTF-8

I checked the logs for the PR #23908 but I assume all are the same.

If I'm not misunderstanding anything, I think pandas is not detecting the locale we want to test with, and it's testing with the default UTF8 locale, as in the rest of the tests.

CC: @jreback @TomAugspurger

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugCIContinuous IntegrationTestingpandas testing functions or related to the test suite

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions