mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-09 01:19:36 +08:00
Also run doc tests for files with a leading underscore
This commit is contained in:
+1
-1
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.],
|
||||
|
||||
Reference in New Issue
Block a user