@@ -98,9 +98,9 @@ def test_kather_nonexisting_dir() -> None:
9898 _ = KatherPatchDataset (save_dir_path = "non-existing-path" )
9999
100100
101- def test_kather_dataset (tmp_path : Path ) -> None :
101+ def test_kather_dataset (track_tmp_path : Path ) -> None :
102102 """Test for kather patch dataset."""
103- save_dir_path = tmp_path
103+ save_dir_path = track_tmp_path
104104
105105 # save to temporary location
106106 # remove previously generated data
@@ -162,9 +162,9 @@ def test_patch_dataset_path_imgs(
162162 assert sampled_img_shape [2 ] == size [2 ]
163163
164164
165- def test_patch_dataset_list_imgs (tmp_path : Path ) -> None :
165+ def test_patch_dataset_list_imgs (track_tmp_path : Path ) -> None :
166166 """Test for patch dataset with a list of images as input."""
167- save_dir_path = tmp_path
167+ save_dir_path = track_tmp_path
168168
169169 size = (5 , 5 , 3 )
170170 img = RNG .integers (low = 0 , high = 255 , size = size )
@@ -229,10 +229,10 @@ def test_patch_datasetarray_imgs() -> None:
229229 assert sampled_img_shape [2 ] == size [2 ]
230230
231231
232- def test_patch_dataset_crash (tmp_path : Path ) -> None :
232+ def test_patch_dataset_crash (track_tmp_path : Path ) -> None :
233233 """Test to make sure patch dataset crashes with incorrect input."""
234234 # all below examples should fail when input to PatchDataset
235- save_dir_path = tmp_path
235+ save_dir_path = track_tmp_path
236236
237237 # not supported input type
238238 imgs = {"a" : RNG .integers (0 , 255 , (4 , 4 , 4 ))}
@@ -341,7 +341,7 @@ def test_patch_dataset_crash(tmp_path: Path) -> None:
341341
342342def test_wsi_patch_dataset ( # noqa: PLR0915
343343 sample_wsi_dict : dict ,
344- tmp_path : Path ,
344+ track_tmp_path : Path ,
345345) -> None :
346346 """A test for creation and bare output."""
347347 # convert to pathlib Path to prevent wsireader complaint
@@ -488,7 +488,7 @@ def __getitem__(self: Proto, idx: int) -> object:
488488 )
489489 negative_mask = imread (mini_wsi_msk )
490490 negative_mask = np .zeros_like (negative_mask )
491- negative_mask_path = tmp_path / "negative_mask.png"
491+ negative_mask_path = track_tmp_path / "negative_mask.png"
492492 imwrite (negative_mask_path , negative_mask )
493493 with pytest .raises (ValueError , match = "No patch coordinates remain after filtering" ):
494494 _ = WSIPatchDataset (
0 commit comments