diff --git a/tests/test_cuimage_reader.py b/tests/test_cuimage_reader.py index c8391939f1..80820648ef 100644 --- a/tests/test_cuimage_reader.py +++ b/tests/test_cuimage_reader.py @@ -26,7 +26,8 @@ PILImage, has_pil = optional_import("PIL.Image") FILE_URL = "https://drive.google.com/uc?id=1sGTKZlJBIz53pfqTxoTqiIQzIoEzHLAe" -FILE_PATH = os.path.join(os.path.dirname(__file__), "testing_data", "temp_" + os.path.basename(FILE_URL)) +base_name, extension = FILE_URL.split("id=")[1], ".tiff" +FILE_PATH = os.path.join(os.path.dirname(__file__), "testing_data", "temp_" + base_name + extension) HEIGHT = 32914 WIDTH = 46000 diff --git a/tests/test_masked_inference_wsi_dataset.py b/tests/test_masked_inference_wsi_dataset.py index f5b2611fd9..576b4c85f4 100644 --- a/tests/test_masked_inference_wsi_dataset.py +++ b/tests/test_masked_inference_wsi_dataset.py @@ -26,7 +26,7 @@ _, has_osl = optional_import("openslide") FILE_URL = "https://drive.google.com/uc?id=1sGTKZlJBIz53pfqTxoTqiIQzIoEzHLAe" -base_name, extension = os.path.splitext(os.path.basename(FILE_URL)) +base_name, extension = FILE_URL.split("id=")[1], ".tiff" FILE_NAME = "temp_" + base_name FILE_PATH = os.path.join(os.path.dirname(__file__), "testing_data", FILE_NAME + extension) diff --git a/tests/test_openslide_reader.py b/tests/test_openslide_reader.py index cf092158f2..55e49fcb28 100644 --- a/tests/test_openslide_reader.py +++ b/tests/test_openslide_reader.py @@ -25,7 +25,8 @@ FILE_URL = "https://drive.google.com/uc?id=1sGTKZlJBIz53pfqTxoTqiIQzIoEzHLAe" -FILE_PATH = os.path.join(os.path.dirname(__file__), "testing_data", "temp_" + os.path.basename(FILE_URL)) +base_name, extension = FILE_URL.split("id=")[1], ".tiff" +FILE_PATH = os.path.join(os.path.dirname(__file__), "testing_data", "temp_" + base_name + extension) HEIGHT = 32914 WIDTH = 46000 diff --git a/tests/test_patch_wsi_dataset.py b/tests/test_patch_wsi_dataset.py index 9259cd0e7b..ca54332ad5 100644 --- a/tests/test_patch_wsi_dataset.py +++ b/tests/test_patch_wsi_dataset.py @@ -26,7 +26,8 @@ _, has_osl = optional_import("openslide") FILE_URL = "https://drive.google.com/uc?id=1sGTKZlJBIz53pfqTxoTqiIQzIoEzHLAe" -FILE_PATH = os.path.join(os.path.dirname(__file__), "testing_data", "temp_" + os.path.basename(FILE_URL)) +base_name, extension = FILE_URL.split("id=")[1], ".tiff" +FILE_PATH = os.path.join(os.path.dirname(__file__), "testing_data", "temp_" + base_name + extension) TEST_CASE_0 = [ { diff --git a/tests/test_smartcache_patch_wsi_dataset.py b/tests/test_smartcache_patch_wsi_dataset.py index 317b6cba63..2150ede51c 100644 --- a/tests/test_smartcache_patch_wsi_dataset.py +++ b/tests/test_smartcache_patch_wsi_dataset.py @@ -25,7 +25,8 @@ has_cim = has_cim and hasattr(_cucim, "CuImage") FILE_URL = "https://drive.google.com/uc?id=1sGTKZlJBIz53pfqTxoTqiIQzIoEzHLAe" -FILE_PATH = os.path.join(os.path.dirname(__file__), "testing_data", "temp_" + os.path.basename(FILE_URL)) +base_name, extension = FILE_URL.split("id=")[1], ".tiff" +FILE_PATH = os.path.join(os.path.dirname(__file__), "testing_data", "temp_" + base_name + extension) TEST_CASE_0 = [ {