diff --git a/skimage/color/tests/test_colorconv.py b/skimage/color/tests/test_colorconv.py index 4bc01e78..bbc1c61b 100644 --- a/skimage/color/tests/test_colorconv.py +++ b/skimage/color/tests/test_colorconv.py @@ -43,6 +43,8 @@ from skimage import data_dir, data import colorsys +np.random.seed(0) + def test_guess_spatial_dimensions(): im1 = np.zeros((5, 5)) diff --git a/skimage/feature/tests/test_censure.py b/skimage/feature/tests/test_censure.py index 53c1c59b..6a4aed9c 100644 --- a/skimage/feature/tests/test_censure.py +++ b/skimage/feature/tests/test_censure.py @@ -5,6 +5,7 @@ from skimage.feature import CENSURE img = moon() +np.random.seed(0) def test_censure_on_rectangular_images(): diff --git a/skimage/filter/rank/tests/test_rank.py b/skimage/filter/rank/tests/test_rank.py index 72f9afe6..d8122ba7 100644 --- a/skimage/filter/rank/tests/test_rank.py +++ b/skimage/filter/rank/tests/test_rank.py @@ -6,6 +6,8 @@ from skimage import data, util from skimage.morphology import cmorph, disk from skimage.filter import rank +np.random.seed(0) + def test_random_sizes(): # make sure the size is not a problem diff --git a/skimage/io/tests/test_freeimage.py b/skimage/io/tests/test_freeimage.py index 4e64bd16..dd34828f 100644 --- a/skimage/io/tests/test_freeimage.py +++ b/skimage/io/tests/test_freeimage.py @@ -14,6 +14,8 @@ try: except RuntimeError: FI_available = False +np.random.seed(0) + def setup_module(self): """The effect of the `plugin.use` call may be overridden by later imports. diff --git a/skimage/io/tests/test_imread.py b/skimage/io/tests/test_imread.py index 206b800d..b4886970 100644 --- a/skimage/io/tests/test_imread.py +++ b/skimage/io/tests/test_imread.py @@ -16,6 +16,8 @@ except ImportError: else: imread_available = True +np.random.seed(0) + def teardown(): reset_plugins() diff --git a/skimage/io/tests/test_pil.py b/skimage/io/tests/test_pil.py index 89147fd6..1b534aa5 100644 --- a/skimage/io/tests/test_pil.py +++ b/skimage/io/tests/test_pil.py @@ -21,6 +21,8 @@ except ImportError: else: PIL_available = True +np.random.seed(0) + def teardown(): reset_plugins() diff --git a/skimage/io/tests/test_plugin_util.py b/skimage/io/tests/test_plugin_util.py index 41f28339..7b337a94 100644 --- a/skimage/io/tests/test_plugin_util.py +++ b/skimage/io/tests/test_plugin_util.py @@ -3,6 +3,8 @@ from skimage.io._plugins.util import prepare_for_display, WindowManager from numpy.testing import * import numpy as np +np.random.seed(0) + class TestPrepareForDisplay: def test_basic(self): diff --git a/skimage/io/tests/test_simpleitk.py b/skimage/io/tests/test_simpleitk.py index 89f7416f..51f94986 100644 --- a/skimage/io/tests/test_simpleitk.py +++ b/skimage/io/tests/test_simpleitk.py @@ -15,6 +15,8 @@ except ImportError: else: sitk_available = True +np.random.seed(0) + def teardown(): reset_plugins() diff --git a/skimage/io/tests/test_tifffile.py b/skimage/io/tests/test_tifffile.py index 0f128bf1..00c7f41c 100644 --- a/skimage/io/tests/test_tifffile.py +++ b/skimage/io/tests/test_tifffile.py @@ -15,6 +15,8 @@ try: except ImportError: TF_available = False +np.random.seed(0) + def teardown(): sio.reset_plugins() diff --git a/skimage/morphology/tests/test_ccomp.py b/skimage/morphology/tests/test_ccomp.py index e934a5b7..48c8a850 100644 --- a/skimage/morphology/tests/test_ccomp.py +++ b/skimage/morphology/tests/test_ccomp.py @@ -5,6 +5,9 @@ from skimage.morphology import label from warnings import catch_warnings from skimage._shared.utils import skimage_deprecation +np.random.seed(0) + + class TestConnectedComponents: def setup(self): self.x = np.array([[0, 0, 3, 2, 1, 9], diff --git a/skimage/transform/tests/test_integral.py b/skimage/transform/tests/test_integral.py index 4a641e71..f3232512 100644 --- a/skimage/transform/tests/test_integral.py +++ b/skimage/transform/tests/test_integral.py @@ -5,6 +5,7 @@ from skimage.transform import integral_image, integrate x = (np.random.random((50, 50)) * 255).astype(np.uint8) s = integral_image(x) +np.random.seed(0) def test_validity(): diff --git a/skimage/transform/tests/test_warps.py b/skimage/transform/tests/test_warps.py index 07054ab7..66c867df 100644 --- a/skimage/transform/tests/test_warps.py +++ b/skimage/transform/tests/test_warps.py @@ -12,6 +12,9 @@ from skimage import transform as tf, data, img_as_float from skimage.color import rgb2gray +np.random.seed(0) + + def test_warp_tform(): x = np.zeros((5, 5), dtype=np.double) x[2, 2] = 1