@@ -237,14 +237,14 @@ def test_cross_section_boundary_boxes() -> None:
237237 assert np .sum (flag - _flag ) == 0 , "Fail Cross Section Flag"
238238
239239
240- def test_crash_segmentor (remote_sample : Callable , tmp_path : Path ) -> None :
240+ def test_crash_segmentor (remote_sample : Callable , track_tmp_path : Path ) -> None :
241241 """Test engine crash when given malformed input."""
242- root_save_dir = Path (tmp_path )
242+ root_save_dir = Path (track_tmp_path )
243243 sample_wsi_svs = Path (remote_sample ("svs-1-small" ))
244244 sample_wsi_msk = remote_sample ("small_svs_tissue_mask" )
245245 sample_wsi_msk = np .load (sample_wsi_msk ).astype (np .uint8 )
246- imwrite (f"{ tmp_path } /small_svs_tissue_mask.jpg" , sample_wsi_msk )
247- sample_wsi_msk = tmp_path .joinpath ("small_svs_tissue_mask.jpg" )
246+ imwrite (f"{ track_tmp_path } /small_svs_tissue_mask.jpg" , sample_wsi_msk )
247+ sample_wsi_msk = track_tmp_path .joinpath ("small_svs_tissue_mask.jpg" )
248248
249249 save_dir = f"{ root_save_dir } /instance/"
250250
@@ -285,17 +285,17 @@ def test_crash_segmentor(remote_sample: Callable, tmp_path: Path) -> None:
285285 )
286286
287287
288- def test_functionality_ci (remote_sample : Callable , tmp_path : Path ) -> None :
288+ def test_functionality_ci (remote_sample : Callable , track_tmp_path : Path ) -> None :
289289 """Functionality test for nuclei instance segmentor."""
290290 gc .collect ()
291- root_save_dir = Path (tmp_path )
291+ root_save_dir = Path (track_tmp_path )
292292 mini_wsi_svs = Path (remote_sample ("wsi4_512_512_svs" ))
293293
294294 resolution = 2.0
295295
296296 reader = WSIReader .open (mini_wsi_svs )
297297 thumb = reader .slide_thumbnail (resolution = resolution , units = "mpp" )
298- mini_wsi_jpg = f"{ tmp_path } /mini_svs.jpg"
298+ mini_wsi_jpg = f"{ track_tmp_path } /mini_svs.jpg"
299299 imwrite (mini_wsi_jpg , thumb )
300300
301301 save_dir = f"{ root_save_dir } /instance/"
@@ -335,11 +335,11 @@ def test_functionality_ci(remote_sample: Callable, tmp_path: Path) -> None:
335335
336336def test_functionality_merge_tile_predictions_ci (
337337 remote_sample : Callable ,
338- tmp_path : Path ,
338+ track_tmp_path : Path ,
339339) -> None :
340340 """Functional tests for merging tile predictions."""
341341 gc .collect () # Force clean up everything on hold
342- save_dir = Path (f"{ tmp_path } /output" )
342+ save_dir = Path (f"{ track_tmp_path } /output" )
343343 mini_wsi_svs = Path (remote_sample ("wsi4_512_512_svs" ))
344344
345345 resolution = 0.5
@@ -438,10 +438,10 @@ def test_functionality_merge_tile_predictions_ci(
438438 toolbox_env .running_on_ci () or not ON_GPU ,
439439 reason = "Local test on machine with GPU." ,
440440)
441- def test_functionality_local (remote_sample : Callable , tmp_path : Path ) -> None :
441+ def test_functionality_local (remote_sample : Callable , track_tmp_path : Path ) -> None :
442442 """Local functionality test for nuclei instance segmentor."""
443- root_save_dir = Path (tmp_path )
444- save_dir = Path (f"{ tmp_path } /output" )
443+ root_save_dir = Path (track_tmp_path )
444+ save_dir = Path (f"{ track_tmp_path } /output" )
445445 mini_wsi_svs = Path (remote_sample ("wsi4_1k_1k_svs" ))
446446
447447 # * generate full output w/o parallel post-processing worker first
@@ -512,17 +512,17 @@ def test_functionality_local(remote_sample: Callable, tmp_path: Path) -> None:
512512
513513def test_cli_nucleus_instance_segment_ioconfig (
514514 remote_sample : Callable ,
515- tmp_path : Path ,
515+ track_tmp_path : Path ,
516516) -> None :
517517 """Test for nucleus segmentation with IOConfig."""
518518 mini_wsi_svs = Path (remote_sample ("wsi4_512_512_svs" ))
519- output_path = tmp_path / "output"
519+ output_path = track_tmp_path / "output"
520520
521521 resolution = 2.0
522522
523523 reader = WSIReader .open (mini_wsi_svs )
524524 thumb = reader .slide_thumbnail (resolution = resolution , units = "mpp" )
525- mini_wsi_jpg = f"{ tmp_path } /mini_svs.jpg"
525+ mini_wsi_jpg = f"{ track_tmp_path } /mini_svs.jpg"
526526 imwrite (mini_wsi_jpg , thumb )
527527
528528 pretrained_weights = fetch_pretrained_weights ("hovernet_fast-pannuke" )
@@ -543,7 +543,7 @@ def test_cli_nucleus_instance_segment_ioconfig(
543543 "save_resolution" : {"units" : "mpp" , "resolution" : 8.0 },
544544 }
545545
546- with Path .open (tmp_path / "config.yaml" , "w" ) as fptr :
546+ with Path .open (track_tmp_path / "config.yaml" , "w" ) as fptr :
547547 yaml .dump (config , fptr )
548548
549549 runner = CliRunner ()
@@ -564,7 +564,7 @@ def test_cli_nucleus_instance_segment_ioconfig(
564564 "--output-path" ,
565565 str (output_path ),
566566 "--yaml-config-path" ,
567- str (tmp_path .joinpath ("config.yaml" )),
567+ str (track_tmp_path .joinpath ("config.yaml" )),
568568 ],
569569 )
570570
@@ -574,10 +574,12 @@ def test_cli_nucleus_instance_segment_ioconfig(
574574 assert output_path .joinpath ("results.json" ).exists ()
575575
576576
577- def test_cli_nucleus_instance_segment (remote_sample : Callable , tmp_path : Path ) -> None :
577+ def test_cli_nucleus_instance_segment (
578+ remote_sample : Callable , track_tmp_path : Path
579+ ) -> None :
578580 """Test for nucleus segmentation."""
579581 mini_wsi_svs = Path (remote_sample ("wsi4_512_512_svs" ))
580- output_path = tmp_path / "output"
582+ output_path = track_tmp_path / "output"
581583
582584 runner = CliRunner ()
583585 nucleus_instance_segment_result = runner .invoke (
0 commit comments