Skip to content

Commit 67a1264

Browse files
authored
Merge pull request #216 from bioimage-io/test_name_for_summaries
add human readable test name to resource test summary
2 parents ae67ff0 + 425791f commit 67a1264

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

bioimageio/core/resource_tests.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ def test_resource(
9191
"""
9292
error: Optional[str] = None
9393
tb: Optional = None
94+
test_name: Optional[str] = None
9495

9596
try:
9697
rd = load_resource_description(
@@ -101,6 +102,7 @@ def test_resource(
101102
tb = traceback.format_tb(e.__traceback__)
102103
else:
103104
if isinstance(rd, Model):
105+
test_name = "reproduced test outputs from test inputs"
104106
model = rd
105107
try:
106108
inputs = [np.load(str(in_path)) for in_path in model.test_inputs]
@@ -145,7 +147,7 @@ def test_resource(
145147

146148
# todo: add tests for non-model resources
147149

148-
return {"error": error, "traceback": tb}
150+
return {"error": error, "traceback": tb, "name": test_name}
149151

150152

151153
def debug_model(

0 commit comments

Comments
 (0)