Skip to content

Commit 74ae671

Browse files
committed
Don't raise exception when tool tests can't be fetched
1 parent 878c23d commit 74ae671

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

src/ephemeris/shed_tools.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -273,12 +273,18 @@ def _test_tool(self, tool, test_user, test_user_api_key):
273273
galaxy_interactor = GalaxyInteractorApi(**galaxy_interactor_kwds)
274274
tool_id = tool["id"]
275275
tool_version = tool["version"]
276-
tool_test_dicts = galaxy_interactor.get_tool_tests(tool_id, tool_version=tool_version)
277-
test_indices = list(range(len(tool_test_dicts)))
276+
test_exceptions = []
278277
tool_test_results = []
279278
tests_passed = []
280-
test_exceptions = []
281-
279+
try:
280+
tool_test_dicts = galaxy_interactor.get_tool_tests(tool_id, tool_version=tool_version)
281+
except Exception as e:
282+
test_exceptions.append((tool_id, e))
283+
Results = namedtuple("Results", ["tool_test_results", "tests_passed", "test_exceptions"])
284+
return Results(tool_test_results=tool_test_results,
285+
tests_passed=tests_passed,
286+
test_exceptions=test_exceptions)
287+
test_indices = list(range(len(tool_test_dicts)))
282288
for test_index in test_indices:
283289
test_id = tool_id + "-" + str(test_index)
284290

0 commit comments

Comments
 (0)