From dc67365ca0b97a9c4da2d28897292003e3745ab1 Mon Sep 17 00:00:00 2001 From: Nelle Varoquaux Date: Wed, 4 Jul 2018 12:26:17 -0700 Subject: [PATCH] MAINT running tests on installed version of pastis --- .travis.yml | 6 +++--- continuous_integration/install.sh | 1 + continuous_integration/test_script.sh | 16 ++++++++++++++++ 3 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 continuous_integration/test_script.sh diff --git a/.travis.yml b/.travis.yml index 8556fc56..97cf05dd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,7 @@ notifications: env: global: - - TEST_RUN_FOLDER="/tmp" # folder where the tests are run from + - TEST_DIR="/tmp/pastis" # folder where the tests are run from matrix: # Ubuntu 14.04 versions - DISTRIB="conda" PYTHON_VERSION="2.6" @@ -33,11 +33,11 @@ before_script: script: - python continuous_integration/show-python-packages-versions.py # We want to back out of the current working directory to make - # sure we are using nilearn installed in site-packages rather + # sure we are using pastis installed in site-packages rather # than the one from the current working directory # Parentheses (run in a subshell) are used to leave # the current directory unchanged - - make test + - bash continuous_integration/test_script.sh after_success: # Ignore coveralls failures as the coveralls server is not very reliable diff --git a/continuous_integration/install.sh b/continuous_integration/install.sh index 89c18f69..3fd53a18 100755 --- a/continuous_integration/install.sh +++ b/continuous_integration/install.sh @@ -104,3 +104,4 @@ if [[ "$COVERAGE" == "true" ]]; then pip install coverage coveralls fi +python setup.py install diff --git a/continuous_integration/test_script.sh b/continuous_integration/test_script.sh new file mode 100644 index 00000000..e5ef03d3 --- /dev/null +++ b/continuous_integration/test_script.sh @@ -0,0 +1,16 @@ +python --version + +run_tests() { + TEST_CMD="nosetests -s -v" + + + mkdir -p $TEST_DIR + cd $TEST_DIR + TEST_CMD="$TEST_CMD --with-coverage pastis --cover-package pastis" + $TEST_CMD pastis +} + + +if [[ "$SKIP_TESTS" != "true" ]]; then + run_tests +fi