Add a test setup helper function

Add a function to set up a skimage test

Switch to new test helper function

Import local packages that raise warnings in test setup function

More fixes to doctests

Fix regionprops doc test

Try and fix the test_rank failure.

Remove no longer needed RectangleSelector shim

Skip more doctests in _regionprops

Try importing another scipy subpackage
This commit is contained in:
Steven Silvester
2014-12-23 16:49:20 -06:00
parent f72882fbd2
commit 4680f30466
24 changed files with 57 additions and 72 deletions
+7
View File
@@ -10,6 +10,7 @@ from skimage import (
from numpy import testing
import numpy as np
from skimage._shared.utils import all_warnings
import warnings
SKIP_RE = re.compile("(\s*>>>.*?)(\s*)#\s*skip\s+if\s+(.*)$")
@@ -177,6 +178,12 @@ def mono_check(plugin, fmt='png'):
testing.assert_allclose(r5, img5)
def setup_test():
from scipy import signal, ndimage, special, optimize, linalg
from skimage import filter, viewer
warnings.simplefilter('error')
if __name__ == '__main__':
color_check('pil')
mono_check('pil')