Skip to content

Commit e1929f7

Browse files
author
y-p
committed
BLD: add a travis build with non utf8 locale, catch encoding issues
zh_CN.GB18030 (simplified chinese, superceding cp936) should be exotic enough to bring out issues of this sort. #2666
1 parent dcd0c9f commit e1929f7

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

.travis.yml

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ matrix:
1515
include:
1616
- python: 2.7
1717
env: VBENCH=true
18+
- python: 2.7
19+
env: LOCALE_OVERRIDE="zh_CN.GB18030" # simplified chinese
1820
- python: 2.7
1921
env: FULL_DEPS=true
2022
- python: 3.2

ci/install.sh

+5
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,8 @@ if [ x"$FULL_DEPS" == x"true" ]; then
6767
# pick recent 0.5dev dec/2012
6868
pip install git+git://github.com/statsmodels/statsmodels@c9062e43b8a5f7385537ca95#egg=statsmodels
6969
fi;
70+
71+
# make sure the desired locale is generated
72+
if [ x"$LOCALE_OVERRIDE" != x"" ]; then
73+
sudo locale-gen "$LOCALE_OVERRIDE"
74+
fi

ci/script.sh

+7
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,17 @@
22

33
echo "inside $0"
44

5+
if [ x"$LOCALE_OVERRIDE" != x"" ]; then
6+
export LC_ALL="$LOCALE_OVERRIDE";
7+
echo "Setting LC_ALL to $LOCALE_OVERRIDE"
8+
(cd /; python -c 'import pandas; print("pandas detected console encoding: %s" % pandas.get_option("display.encoding"))')
9+
fi
10+
511
if [ x"$VBENCH" != x"true" ]; then
612
nosetests --exe -w /tmp -A "not slow" pandas;
713
exit
814
fi
15+
916
if [ x"$VBENCH" == x"true" ]; then
1017
python vb_suite/perf_HEAD.py;
1118
exit

0 commit comments

Comments
 (0)