From b37913d63c7853539c1f19c130df78598203a0df Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Fri, 10 Oct 2014 11:28:33 -0500 Subject: [PATCH] Use a null backend during the doc examples --- tools/travis_test.sh | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/tools/travis_test.sh b/tools/travis_test.sh index 62cfe948..25245ee2 100755 --- a/tools/travis_test.sh +++ b/tools/travis_test.sh @@ -27,13 +27,6 @@ else export QT_API=pyside fi -# Matplotlib settings - must be after we install Pyside -MPL_DIR=$HOME/.config/matplotlib -mkdir -p $MPL_DIR -touch $MPL_DIR/matplotlibrc -echo 'backend : Agg' > $MPL_DIR/matplotlibrc -echo 'backend.qt4 : '$MPL_QT_API >> $MPL_DIR/matplotlibrc - # imread does NOT support py3.2 if [[ $TRAVIS_PYTHON_VERSION != 3.2 ]]; then sudo apt-get install -q libtiff4-dev libwebp-dev libpng12-dev xcftools @@ -52,6 +45,13 @@ if [[ $TRAVIS_PYTHON_VERSION == 2.* ]]; then pip install pyamg fi +# Matplotlib settings - do not show figures during doc examples +MPL_DIR=$HOME/.config/matplotlib +mkdir -p $MPL_DIR +touch $MPL_DIR/matplotlibrc +echo 'backend : Template' > $MPL_DIR/matplotlibrc + + tools/header.py "Run doc examples" for f in doc/examples/*.py; do python "$f"; @@ -67,6 +67,11 @@ for f in doc/examples/applications/*.py; do fi done +# Now configure Matplotlib to use Qt4 +echo 'backend: Agg' > $MPL_DIR/matplotlibrc +echo 'backend.qt4 : '$MPL_QT_API >> $MPL_DIR/matplotlibrc + + tools/header.py "Run tests with all dependencies" # run tests again with optional dependencies to get more coverage if [[ $TRAVIS_PYTHON_VERSION == 3.3 ]]; then