From 3b859ce8173bb233dd75b87f1eb5e93408880d20 Mon Sep 17 00:00:00 2001 From: Nicolas Bonnotte Date: Sun, 28 Aug 2016 19:30:32 +0200 Subject: [PATCH 1/5] Test for Python 3.4 with C locale --- .travis.yml | 29 +++++++++++++++++++++++++++++ pandas/tests/formats/test_format.py | 4 ++-- 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index c6f6d8b81ae59..c939020814006 100644 --- a/.travis.yml +++ b/.travis.yml @@ -115,6 +115,21 @@ matrix: apt: packages: - xsel +# In allow_failures + - python: 3.4 + env: + - JOB_NAME: "34_slow_ascii" + - JOB_TAG=_SLOW + - NOSE_ARGS="slow and not network and not disabled" + - LOCALE_OVERRIDE="C" + - FULL_DEPS=true + - CLIPBOARD=xsel + - CACHE_NAME="34_slow_ascii" + - USE_CACHE=true + addons: + apt: + packages: + - xsel # In allow_failures - python: 2.7 env: @@ -184,6 +199,20 @@ matrix: apt: packages: - xsel + - python: 3.4 + env: + - JOB_NAME: "34_slow_ascii" + - JOB_TAG=_SLOW + - NOSE_ARGS="slow and not network and not disabled" + - LOCALE_OVERRIDE="C" + - FULL_DEPS=true + - CLIPBOARD=xsel + - CACHE_NAME="34_slow_ascii" + - USE_CACHE=true + addons: + apt: + packages: + - xsel - python: 2.7 env: - JOB_NAME: "27_build_test_conda" diff --git a/pandas/tests/formats/test_format.py b/pandas/tests/formats/test_format.py index 7e55c04fec7cc..ba7ad55a081cd 100644 --- a/pandas/tests/formats/test_format.py +++ b/pandas/tests/formats/test_format.py @@ -2820,7 +2820,7 @@ def test_to_latex_filename(self): self.assertEqual(df.to_latex(), f.read()) # test with utf-8 without encoding option - if compat.PY3: # python3 default encoding is utf-8 + if compat.PY3: # python3: pandas default encoding is utf-8 with tm.ensure_clean('test.tex') as path: df.to_latex(path) with codecs.open(path, 'r') as f: @@ -4295,7 +4295,7 @@ def format_func(x): formatter = fmt.Datetime64Formatter(x, formatter=format_func) result = formatter.get_result() self.assertEqual(result, ['2016-01', '2016-02']) - + def test_datetime64formatter_hoursecond(self): x = Series(pd.to_datetime(['10:10:10.100', '12:12:12.120'], From 3b4c6a5170c51c2d6b66d0c354dbca9342575c83 Mon Sep 17 00:00:00 2001 From: Nicolas Bonnotte Date: Mon, 29 Aug 2016 06:50:40 +0200 Subject: [PATCH 2/5] Travis conf: new test with python 3.5 and LC_ALL=C --- .travis.yml | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index c939020814006..cb15135b1ab60 100644 --- a/.travis.yml +++ b/.travis.yml @@ -116,15 +116,14 @@ matrix: packages: - xsel # In allow_failures - - python: 3.4 + - python: 3.5 env: - - JOB_NAME: "34_slow_ascii" - - JOB_TAG=_SLOW - - NOSE_ARGS="slow and not network and not disabled" + - JOB_NAME: "35_ascii" + - NOSE_ARGS="not slow and not network and not disabled" - LOCALE_OVERRIDE="C" - FULL_DEPS=true - CLIPBOARD=xsel - - CACHE_NAME="34_slow_ascii" + - CACHE_NAME="35_ascii" - USE_CACHE=true addons: apt: @@ -199,15 +198,14 @@ matrix: apt: packages: - xsel - - python: 3.4 + - python: 3.5 env: - - JOB_NAME: "34_slow_ascii" - - JOB_TAG=_SLOW + - JOB_NAME: "35_ascii" - NOSE_ARGS="slow and not network and not disabled" - LOCALE_OVERRIDE="C" - FULL_DEPS=true - CLIPBOARD=xsel - - CACHE_NAME="34_slow_ascii" + - CACHE_NAME="35_ascii" - USE_CACHE=true addons: apt: From c825f86a3fa883d22195db989f19073f0f0db8f3 Mon Sep 17 00:00:00 2001 From: Nicolas Bonnotte Date: Sat, 3 Sep 2016 08:39:40 +0200 Subject: [PATCH 3/5] New files requirements-3.5_ASCII.* --- .travis.yml | 41 +++++++++++---------------------- ci/requirements-3.5_ASCII.build | 4 ++++ ci/requirements-3.5_ASCII.run | 3 +++ 3 files changed, 21 insertions(+), 27 deletions(-) create mode 100644 ci/requirements-3.5_ASCII.build create mode 100644 ci/requirements-3.5_ASCII.run diff --git a/.travis.yml b/.travis.yml index cb15135b1ab60..17346e24a5442 100644 --- a/.travis.yml +++ b/.travis.yml @@ -115,20 +115,6 @@ matrix: apt: packages: - xsel -# In allow_failures - - python: 3.5 - env: - - JOB_NAME: "35_ascii" - - NOSE_ARGS="not slow and not network and not disabled" - - LOCALE_OVERRIDE="C" - - FULL_DEPS=true - - CLIPBOARD=xsel - - CACHE_NAME="35_ascii" - - USE_CACHE=true - addons: - apt: - packages: - - xsel # In allow_failures - python: 2.7 env: @@ -198,19 +184,6 @@ matrix: apt: packages: - xsel - - python: 3.5 - env: - - JOB_NAME: "35_ascii" - - NOSE_ARGS="slow and not network and not disabled" - - LOCALE_OVERRIDE="C" - - FULL_DEPS=true - - CLIPBOARD=xsel - - CACHE_NAME="35_ascii" - - USE_CACHE=true - addons: - apt: - packages: - - xsel - python: 2.7 env: - JOB_NAME: "27_build_test_conda" @@ -246,6 +219,20 @@ matrix: apt: packages: - language-pack-it + - python: 3.5 + env: + - JOB_NAME: "35_ascii" + - JOB_TAG=_ASCII + - NOSE_ARGS="not slow and not network and not disabled" + - LOCALE_OVERRIDE="C" + - FULL_DEPS=true + - CLIPBOARD=xsel + - CACHE_NAME="35_ascii" + - USE_CACHE=true + addons: + apt: + packages: + - xsel - python: 2.7 env: - JOB_NAME: "doc_build" diff --git a/ci/requirements-3.5_ASCII.build b/ci/requirements-3.5_ASCII.build new file mode 100644 index 0000000000000..9558cf00ddf5c --- /dev/null +++ b/ci/requirements-3.5_ASCII.build @@ -0,0 +1,4 @@ +python-dateutil +pytz +numpy +cython diff --git a/ci/requirements-3.5_ASCII.run b/ci/requirements-3.5_ASCII.run new file mode 100644 index 0000000000000..b9d543f557d06 --- /dev/null +++ b/ci/requirements-3.5_ASCII.run @@ -0,0 +1,3 @@ +python-dateutil +pytz +numpy From b876296d54d9ef5e64894f09e2c527c6400ae2e4 Mon Sep 17 00:00:00 2001 From: Nicolas Bonnotte Date: Mon, 5 Sep 2016 07:01:39 +0200 Subject: [PATCH 4/5] Base matrix configuration --- .travis.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.travis.yml b/.travis.yml index 17346e24a5442..91ae71f5a89bf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -153,6 +153,21 @@ matrix: apt: packages: - language-pack-it +# In allow_failures + - python: 3.5 + env: + - JOB_NAME: "35_ascii" + - JOB_TAG=_ASCII + - NOSE_ARGS="not slow and not network and not disabled" + - LOCALE_OVERRIDE="C" + - FULL_DEPS=true + - CLIPBOARD=xsel + - CACHE_NAME="35_ascii" + - USE_CACHE=true + addons: + apt: + packages: + - xsel # In allow_failures - python: 2.7 env: From dadf73c0222fe7f49d6d0e179cc54dd37d642a14 Mon Sep 17 00:00:00 2001 From: Nicolas Bonnotte Date: Mon, 5 Sep 2016 19:04:13 +0200 Subject: [PATCH 5/5] New tentative with C locale --- .travis.yml | 12 ------------ pandas/tools/tests/test_util.py | 8 +++++--- 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/.travis.yml b/.travis.yml index 91ae71f5a89bf..4eefd6ca83694 100644 --- a/.travis.yml +++ b/.travis.yml @@ -160,14 +160,8 @@ matrix: - JOB_TAG=_ASCII - NOSE_ARGS="not slow and not network and not disabled" - LOCALE_OVERRIDE="C" - - FULL_DEPS=true - - CLIPBOARD=xsel - CACHE_NAME="35_ascii" - USE_CACHE=true - addons: - apt: - packages: - - xsel # In allow_failures - python: 2.7 env: @@ -240,14 +234,8 @@ matrix: - JOB_TAG=_ASCII - NOSE_ARGS="not slow and not network and not disabled" - LOCALE_OVERRIDE="C" - - FULL_DEPS=true - - CLIPBOARD=xsel - CACHE_NAME="35_ascii" - USE_CACHE=true - addons: - apt: - packages: - - xsel - python: 2.7 env: - JOB_NAME: "doc_build" diff --git a/pandas/tools/tests/test_util.py b/pandas/tools/tests/test_util.py index 7532997ef9d8e..d8a98bbb3fd27 100644 --- a/pandas/tools/tests/test_util.py +++ b/pandas/tools/tests/test_util.py @@ -68,10 +68,12 @@ def test_set_locale(self): raise nose.SkipTest("Only a single locale found, no point in " "trying to test setting another locale") - if LOCALE_OVERRIDE is not None: - lang, enc = LOCALE_OVERRIDE.split('.') - else: + if LOCALE_OVERRIDE is None: lang, enc = 'it_CH', 'UTF-8' + elif LOCALE_OVERRIDE == 'C': + lang, enc = 'en_US', 'ascii' + else: + lang, enc = LOCALE_OVERRIDE.split('.') enc = codecs.lookup(enc).name new_locale = lang, enc