Skip to content

Commit 1e61aed

Browse files
nbonnottejreback
authored andcommitted
BLD: Test for Python 3.5 with C locale
xref #12337 Author: Nicolas Bonnotte <[email protected]> Closes #14114 from nbonnotte/unicode-to_latex-12337 and squashes the following commits: dadf73c [Nicolas Bonnotte] New tentative with C locale b876296 [Nicolas Bonnotte] Base matrix configuration c825f86 [Nicolas Bonnotte] New files requirements-3.5_ASCII.* 3b4c6a5 [Nicolas Bonnotte] Travis conf: new test with python 3.5 and LC_ALL=C 3b859ce [Nicolas Bonnotte] Test for Python 3.4 with C locale
1 parent 2672a79 commit 1e61aed

File tree

5 files changed

+31
-5
lines changed

5 files changed

+31
-5
lines changed

.travis.yml

+17
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,15 @@ matrix:
153153
apt:
154154
packages:
155155
- language-pack-it
156+
# In allow_failures
157+
- python: 3.5
158+
env:
159+
- JOB_NAME: "35_ascii"
160+
- JOB_TAG=_ASCII
161+
- NOSE_ARGS="not slow and not network and not disabled"
162+
- LOCALE_OVERRIDE="C"
163+
- CACHE_NAME="35_ascii"
164+
- USE_CACHE=true
156165
# In allow_failures
157166
- python: 2.7
158167
env:
@@ -219,6 +228,14 @@ matrix:
219228
apt:
220229
packages:
221230
- language-pack-it
231+
- python: 3.5
232+
env:
233+
- JOB_NAME: "35_ascii"
234+
- JOB_TAG=_ASCII
235+
- NOSE_ARGS="not slow and not network and not disabled"
236+
- LOCALE_OVERRIDE="C"
237+
- CACHE_NAME="35_ascii"
238+
- USE_CACHE=true
222239
- python: 2.7
223240
env:
224241
- JOB_NAME: "doc_build"

ci/requirements-3.5_ASCII.build

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
python-dateutil
2+
pytz
3+
numpy
4+
cython

ci/requirements-3.5_ASCII.run

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
python-dateutil
2+
pytz
3+
numpy

pandas/tests/formats/test_format.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -2820,7 +2820,7 @@ def test_to_latex_filename(self):
28202820
self.assertEqual(df.to_latex(), f.read())
28212821

28222822
# test with utf-8 without encoding option
2823-
if compat.PY3: # python3 default encoding is utf-8
2823+
if compat.PY3: # python3: pandas default encoding is utf-8
28242824
with tm.ensure_clean('test.tex') as path:
28252825
df.to_latex(path)
28262826
with codecs.open(path, 'r') as f:
@@ -4295,7 +4295,7 @@ def format_func(x):
42954295
formatter = fmt.Datetime64Formatter(x, formatter=format_func)
42964296
result = formatter.get_result()
42974297
self.assertEqual(result, ['2016-01', '2016-02'])
4298-
4298+
42994299
def test_datetime64formatter_hoursecond(self):
43004300

43014301
x = Series(pd.to_datetime(['10:10:10.100', '12:12:12.120'],

pandas/tools/tests/test_util.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,12 @@ def test_set_locale(self):
6868
raise nose.SkipTest("Only a single locale found, no point in "
6969
"trying to test setting another locale")
7070

71-
if LOCALE_OVERRIDE is not None:
72-
lang, enc = LOCALE_OVERRIDE.split('.')
73-
else:
71+
if LOCALE_OVERRIDE is None:
7472
lang, enc = 'it_CH', 'UTF-8'
73+
elif LOCALE_OVERRIDE == 'C':
74+
lang, enc = 'en_US', 'ascii'
75+
else:
76+
lang, enc = LOCALE_OVERRIDE.split('.')
7577

7678
enc = codecs.lookup(enc).name
7779
new_locale = lang, enc

0 commit comments

Comments
 (0)