diff --git a/requirements-dev.txt b/requirements-dev.txt index f89cda031c..651a99eba9 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -32,7 +32,7 @@ Sphinx==3.5.3 recommonmark==0.6.0 sphinx-autodoc-typehints==1.11.1 sphinx-rtd-theme==0.5.2 -cucim==22.2.0; platform_system == "Linux" +cucim==22.2.1; platform_system == "Linux" openslide-python==1.1.2 imagecodecs; platform_system == "Linux" tifffile; platform_system == "Linux" diff --git a/tests/test_rand_cucim_dict_transform.py b/tests/test_rand_cucim_dict_transform.py index cd41b7f49a..2f27dd5f1f 100644 --- a/tests/test_rand_cucim_dict_transform.py +++ b/tests/test_rand_cucim_dict_transform.py @@ -90,7 +90,7 @@ class TestRandCuCIMDict(unittest.TestCase): ] ) def test_tramsforms_numpy_single(self, params, input, expected): - input = {"image": input} + input = {"image": np.copy(input)} # apply_prob=1.0 output = RandCuCIMd(keys="image", apply_prob=1.0, **params)(input)["image"] self.assertTrue(output.dtype == expected.dtype) @@ -115,7 +115,7 @@ def test_tramsforms_numpy_single(self, params, input, expected): ] ) def test_tramsforms_numpy_batch(self, params, input, expected): - input = {"image": input[cp.newaxis, ...]} + input = {"image": np.copy(input[cp.newaxis, ...])} expected = expected[cp.newaxis, ...] # apply_prob=1.0 output = RandCuCIMd(keys="image", apply_prob=1.0, **params)(input)["image"] diff --git a/tests/test_rand_cucim_transform.py b/tests/test_rand_cucim_transform.py index 0950329833..c11ca5cd31 100644 --- a/tests/test_rand_cucim_transform.py +++ b/tests/test_rand_cucim_transform.py @@ -91,6 +91,7 @@ class TestRandCuCIM(unittest.TestCase): ) def test_tramsforms_numpy_single(self, params, input, expected): # apply_prob=1.0 + input = np.copy(input) output = RandCuCIM(apply_prob=1.0, **params)(input) self.assertTrue(output.dtype == expected.dtype) self.assertTrue(isinstance(output, np.ndarray)) @@ -114,7 +115,7 @@ def test_tramsforms_numpy_single(self, params, input, expected): ] ) def test_tramsforms_numpy_batch(self, params, input, expected): - input = input[cp.newaxis, ...] + input = np.copy(input[cp.newaxis, ...]) expected = expected[cp.newaxis, ...] # apply_prob=1.0 output = RandCuCIM(apply_prob=1.0, **params)(input)