Skip to content

Commit 7a34f01

Browse files
committed
Corrects testing_data paths on tests
1 parent 19b2fdf commit 7a34f01

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

tests/data/test_masked_patch_wsi_dataset.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
from __future__ import annotations
1313

1414
import os
15+
from pathlib import Path
1516
import unittest
1617
from unittest import skipUnless
1718

@@ -34,7 +35,7 @@
3435

3536
FILE_KEY = "wsi_generic_tiff"
3637
FILE_URL = testing_data_config("images", FILE_KEY, "url")
37-
TESTS_PATH = os.path.dirname(os.path.realpath(__file__))
38+
TESTS_PATH = Path(__file__).parents[1]
3839
FILE_PATH = os.path.join(TESTS_PATH, "testing_data", f"temp_{FILE_KEY}.tiff")
3940

4041
TEST_CASE_0 = [

tests/networks/blocks/warp/test_warp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ def test_grad(self):
157157
gradcheck(warp_layer, (input_image, ddf), atol=1e-2, eps=1e-2)
158158

159159

160-
TESTS_PATH = Path(__file__).parents[1]
160+
TESTS_PATH = Path(__file__).parents[3]
161161
FILE_PATH = os.path.join(TESTS_PATH, "testing_data", "temp_" + "mri.nii")
162162

163163

0 commit comments

Comments
 (0)