diff --git a/.travis.yml b/.travis.yml index 91cc8141..3c627c85 100644 --- a/.travis.yml +++ b/.travis.yml @@ -59,8 +59,8 @@ script: - "echo 'backend : Agg' > $HOME/.matplotlib/matplotlibrc" - "echo 'backend.qt4 : PyQt4' >> $HOME/.matplotlib/matplotlibrc" # Run all tests - - python -c "import skimage, sys; sys.exit(skimage.test_verbose())" - - python -c "import skimage, sys; sys.exit(skimage.doctest_verbose())" + - python -c "import skimage, sys, io; sys.exit(skimage.test_verbose())" + - python -c "import skimage, sys, io; sys.exit(skimage.doctest_verbose())" # Run all doc examples - export PYTHONPATH=$(pwd):$PYTHONPATH - for f in doc/examples/*.py; do $PYTHON "$f"; if [ $? -ne 0 ]; then exit 1; fi done diff --git a/Makefile b/Makefile index e8a85587..2ace534e 100644 --- a/Makefile +++ b/Makefile @@ -7,10 +7,10 @@ clean: find . -name "*.so" -o -name "*.pyc" -o -name "*.pyx.md5" | xargs rm -f test: - python -c "import skimage, sys; sys.exit(skimage.test_verbose())" + python -c "import skimage, sys, io; sys.exit(skimage.test_verbose())" doctest: - python -c "import skimage, sys; sys.exit(skimage.doctest_verbose())" + python -c "import skimage, sys, io; sys.exit(skimage.doctest_verbose())" coverage: nosetests skimage --with-coverage --cover-package=skimage diff --git a/skimage/__init__.py b/skimage/__init__.py index 49510c91..f5697c84 100644 --- a/skimage/__init__.py +++ b/skimage/__init__.py @@ -89,6 +89,7 @@ else: if doctest: args.extend(['--with-doctest', '--ignore-files=^\.', '--ignore-files=^setup\.py$$', '--ignore-files=test']) + # Make sure warnings do not break the doc tests with _warnings.catch_warnings(): _warnings.simplefilter("ignore") success = nose.run('skimage', argv=args)