Skip to content

Commit 2a57316

Browse files
authored
Merge pull request #137 from mvdbeek/dont_fail_when_test_def_fails
Don't raise exception when tool tests can't be fetched
2 parents 7fed192 + bc3eb9a commit 2a57316

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

src/ephemeris/shed_tools.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,16 @@ def _test_tool(executor,
315315
test_history = galaxy_interactor.new_history()
316316
tool_id = tool["id"]
317317
tool_version = tool["version"]
318-
tool_test_dicts = galaxy_interactor.get_tool_tests(tool_id, tool_version=tool_version)
318+
try:
319+
tool_test_dicts = galaxy_interactor.get_tool_tests(tool_id, tool_version=tool_version)
320+
except Exception as e:
321+
if log:
322+
log.warning("Fetching test definition for tool '%s' failed", tool_id, exc_info=True)
323+
test_exceptions.append((tool_id, e))
324+
Results = namedtuple("Results", ["tool_test_results", "tests_passed", "test_exceptions"])
325+
return Results(tool_test_results=tool_test_results,
326+
tests_passed=tests_passed,
327+
test_exceptions=test_exceptions)
319328
test_indices = list(range(len(tool_test_dicts)))
320329

321330
for test_index in test_indices:

0 commit comments

Comments
 (0)