Skip to content

Apache DataFusion SQL Query Engine

ARROW-55: [Python] Fix unit tests in 2.7

Dan Robinson2ecf84544054
diff --git a/ci/travis_script_python.sh b/ci/travis_script_python.sh
index 14d66b44ff..af6b008572 100755
--- a/ci/travis_script_python.sh
+++ b/ci/travis_script_python.sh
@@ -26,29 +26,34 @@ export PATH="$MINICONDA/bin:$PATH"
conda update -y -q conda
conda info -a
-PYTHON_VERSION=3.5
-CONDA_ENV_NAME=pyarrow-test
+python_version_tests() {
+ PYTHON_VERSION=$1
+ CONDA_ENV_NAME="pyarrow-test-${PYTHON_VERSION}"
+ conda create -y -q -n $CONDA_ENV_NAME python=$PYTHON_VERSION
+ source activate $CONDA_ENV_NAME
-conda create -y -q -n $CONDA_ENV_NAME python=$PYTHON_VERSION
-source activate $CONDA_ENV_NAME
+ python --version
+ which python
-python --version
-which python
+ # faster builds, please
+ conda install -y nomkl
-# faster builds, please
-conda install -y nomkl
+ # Expensive dependencies install from Continuum package repo
+ conda install -y pip numpy pandas cython
-# Expensive dependencies install from Continuum package repo
-conda install -y pip numpy pandas cython
+ # Other stuff pip install
+ pip install -r requirements.txt
-# Other stuff pip install
-pip install -r requirements.txt
+ export ARROW_HOME=$ARROW_CPP_INSTALL
-export ARROW_HOME=$ARROW_CPP_INSTALL
+ python setup.py build_ext --inplace
-python setup.py build_ext --inplace
+ py.test -vv -r sxX pyarrow
+}
-py.test -vv -r sxX pyarrow
+# run tests for python 2.7 and 3.5
+python_version_tests 2.7
+python_version_tests 3.5
# if [ $TRAVIS_OS_NAME == "linux" ]; then
# valgrind --tool=memcheck py.test -vv -r sxX arrow