Skip to content

Test for Python 3.5 with C locale #14114

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,15 @@ 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"
- CACHE_NAME="35_ascii"
- USE_CACHE=true
# In allow_failures
- python: 2.7
env:
Expand Down Expand Up @@ -219,6 +228,14 @@ 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"
- CACHE_NAME="35_ascii"
- USE_CACHE=true
- python: 2.7
env:
- JOB_NAME: "doc_build"
Expand Down
4 changes: 4 additions & 0 deletions ci/requirements-3.5_ASCII.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
python-dateutil
pytz
numpy
cython
3 changes: 3 additions & 0 deletions ci/requirements-3.5_ASCII.run
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
python-dateutil
pytz
numpy
4 changes: 2 additions & 2 deletions pandas/tests/formats/test_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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'],
Expand Down
8 changes: 5 additions & 3 deletions pandas/tools/tests/test_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down