Also run doc tests for files with a leading underscore

This commit is contained in:
Johannes Schönberger
2013-11-03 23:13:05 +01:00
parent 8b74ab496b
commit a1fcc65e88
4 changed files with 9 additions and 5 deletions
+1 -1
View File
@@ -37,7 +37,7 @@ script:
- "echo 'backend : Agg' > $HOME/.matplotlib/matplotlibrc"
- "echo 'backend.qt4 : PyQt4' >> $HOME/.matplotlib/matplotlibrc"
# Run all tests
- nosetests-$PYVER --exe -v --with-doctest skimage
- nosetests-$PYVER --exe -v --with-doctest --ignore-files='^\.' --ignore-files='^setup\.py$$' skimage
# 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
+5 -1
View File
@@ -10,7 +10,11 @@ test:
nosetests skimage
doctest:
nosetests --with-doctest skimage
nosetests \
--with-doctest \
--ignore-files="^\." \
--ignore-files="^setup\.py$$" \
skimage
coverage:
nosetests skimage --with-coverage --cover-package=skimage
+1 -1
View File
@@ -500,7 +500,7 @@ def corner_peaks(image, min_distance=10, threshold_abs=0, threshold_rel=0.1,
Examples
--------
>>> from skimage.feature import peak_local_max, corner_peaks
>>> from skimage.feature import peak_local_max
>>> response = np.zeros((5, 5))
>>> response[2:4, 2:4] = 1
>>> response
+2 -2
View File
@@ -35,7 +35,7 @@ def corner_moravec(image, Py_ssize_t window_size=1):
Examples
--------
>>> from skimage.feature import moravec, peak_local_max
>>> from skimage.feature import corner_moravec, peak_local_max
>>> square = np.zeros([7, 7])
>>> square[3, 3] = 1
>>> square
@@ -46,7 +46,7 @@ def corner_moravec(image, Py_ssize_t window_size=1):
[ 0., 0., 0., 0., 0., 0., 0.],
[ 0., 0., 0., 0., 0., 0., 0.],
[ 0., 0., 0., 0., 0., 0., 0.]])
>>> moravec(square)
>>> corner_moravec(square)
array([[ 0., 0., 0., 0., 0., 0., 0.],
[ 0., 0., 0., 0., 0., 0., 0.],
[ 0., 0., 1., 1., 1., 0., 0.],