mirror of
https://github.com/wassname/scikit-image.git
synced 2026-08-14 12:50:39 +08:00
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:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user