diff --git a/src/fluidimage/postproc/test_piv.py b/src/fluidimage/postproc/test_piv.py index 0f5c9e3d..546236c2 100644 --- a/src/fluidimage/postproc/test_piv.py +++ b/src/fluidimage/postproc/test_piv.py @@ -19,7 +19,7 @@ def setUpClass(cls): @classmethod def tearDownClass(cls): if cls.path_tests.exists(): - rmtree(cls.path_tests) + rmtree(cls.path_tests, ignore_errors=True) def test_get_grid(self): xs1d, ys1d = get_grid_pixel_from_piv_file(self.path_piv) diff --git a/src/fluidimage/reconstruct/tomo/mlos.py b/src/fluidimage/reconstruct/tomo/mlos.py index 4d4a275e..a7fc828b 100644 --- a/src/fluidimage/reconstruct/tomo/mlos.py +++ b/src/fluidimage/reconstruct/tomo/mlos.py @@ -231,7 +231,7 @@ def _estimate_max_array_size(dtype=np.float64): particle_images = path_image_samples / "TomoPIV" / "particle" output_dir = path_image_samples / "TomoPIV" / "tomo" if output_dir.exists(): - shutil.rmtree(output_dir) + shutil.rmtree(output_dir, ignore_errors=True) for cam in tomo.cams: print(f"Projecting {cam}...") diff --git a/src/fluidimage/reconstruct/tomo/test_mlos.py b/src/fluidimage/reconstruct/tomo/test_mlos.py index 707aaaf0..87398c9a 100644 --- a/src/fluidimage/reconstruct/tomo/test_mlos.py +++ b/src/fluidimage/reconstruct/tomo/test_mlos.py @@ -28,7 +28,7 @@ class TestMLOS(unittest.TestCase): """Test fluidimage.reconstruct.tomo.mlos module.""" def tearDown(self): - shutil.rmtree(path_output) + shutil.rmtree(path_output, ignore_errors=True) def test(self): """Test classes TomoMLOSCV and ArrayTomoCV.""" diff --git a/src/fluidimage/topologies/test_bos.py b/src/fluidimage/topologies/test_bos.py index d5d8b03e..4da60b7a 100644 --- a/src/fluidimage/topologies/test_bos.py +++ b/src/fluidimage/topologies/test_bos.py @@ -17,7 +17,7 @@ def tearDownClass(cls): path = cls.path_input_files path_out = Path(str(path) + "." + cls.postfix) if path_out.exists(): - rmtree(path_out) + rmtree(path_out, ignore_errors=True) def test_bos_new_multiproc(self): params = TopologyBOS.create_default_params() diff --git a/src/fluidimage/topologies/test_image2image.py b/src/fluidimage/topologies/test_image2image.py index 632d6bdc..c1d3e375 100644 --- a/src/fluidimage/topologies/test_image2image.py +++ b/src/fluidimage/topologies/test_image2image.py @@ -16,7 +16,7 @@ def setUpClass(cls): def tearDownClass(cls): path_out = Path(str(cls.path_src) + "." + cls.postfix) if path_out.exists(): - rmtree(path_out) + rmtree(path_out, ignore_errors=True) def test_piv_new(self): params = TopologyImage2Image.create_default_params() diff --git a/src/fluidimage/topologies/test_optical_flow.py b/src/fluidimage/topologies/test_optical_flow.py index d4affaf0..3fbdeaee 100644 --- a/src/fluidimage/topologies/test_optical_flow.py +++ b/src/fluidimage/topologies/test_optical_flow.py @@ -21,7 +21,7 @@ def tearDownClass(cls): for path in paths: path_out = Path(str(path.parent) + "." + cls.postfix) if path_out.exists(): - rmtree(path_out) + rmtree(path_out, ignore_errors=True) def test_optical_flow(self): params = TopologyOpticalFlow.create_default_params() diff --git a/src/fluidimage/topologies/test_piv.py b/src/fluidimage/topologies/test_piv.py index 75e26300..f0faaaed 100644 --- a/src/fluidimage/topologies/test_piv.py +++ b/src/fluidimage/topologies/test_piv.py @@ -22,7 +22,7 @@ def tearDownClass(cls): for path in paths: path_out = Path(str(path.parent) + "." + cls.postfix) if path_out.exists(): - rmtree(path_out) + rmtree(path_out, ignore_errors=True) def test_piv_new(self): params = TopologyPIV.create_default_params() diff --git a/src/fluidimage/topologies/test_surftracking.py b/src/fluidimage/topologies/test_surftracking.py index 8084f98d..a3b699b9 100644 --- a/src/fluidimage/topologies/test_surftracking.py +++ b/src/fluidimage/topologies/test_surftracking.py @@ -39,7 +39,7 @@ def setUpClass(cls): def tearDownClass(cls): # path_out = Path(str(cls.path_src) + "." + cls.postfix) if cls.path_out.exists(): - rmtree(cls.path_out) + rmtree(cls.path_out, ignore_errors=True) def test_surftrack(self): params = TopologySurfaceTracking.create_default_params() diff --git a/src/fluidimage/works/piv/test_piv.py b/src/fluidimage/works/piv/test_piv.py index bb772116..315ccc1d 100644 --- a/src/fluidimage/works/piv/test_piv.py +++ b/src/fluidimage/works/piv/test_piv.py @@ -27,7 +27,7 @@ def setUpClass(cls): @classmethod def tearDownClass(cls): if cls.path_tmp.exists(): - rmtree(cls.path_tmp) + rmtree(cls.path_tmp, ignore_errors=True) def test_minimal_piv(self): params = WorkPIV.create_default_params()