Skip to content

Commit 5033d9f

Browse files
committed
Try fixing test discovery
1 parent 638fb06 commit 5033d9f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/runner.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,10 @@ def get_default_pattern(loader):
133133
print(files)
134134
cases = []
135135
for test_module in tests_path.rglob("test_*py"):
136-
case_str = str(test_module.relative_to(tests_path).as_posix()).replace("/", ".")[:-3]
137-
if case_str in files:
138-
cases.append(f"tests.{case_str}")
136+
test_file = str(test_module.relative_to(tests_path).as_posix())
137+
case_str = test_file.replace("/", ".")[:-3]
138+
if test_file in files:
139+
cases.append(case_str)
139140
else:
140141
print(f"monai test runner: excluding {test_module.name}")
141142
print(cases)

0 commit comments

Comments
 (0)