Skip to content

Commit

Permalink
move assertion instead of removing it
Browse files Browse the repository at this point in the history
otherwise the tool test will just return a list out of bounds exception
which is unclear to the user
  • Loading branch information
bernt-matthias committed Mar 25, 2024
1 parent b1e69d9 commit 012ab7d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/galaxy/tool_util/verify/interactor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1486,7 +1486,6 @@ def _handle_def_errors(testdef):
def _verify_outputs(testdef, history, jobs, data_list, data_collection_list, galaxy_interactor, quiet=False):
assert len(jobs) == 1, "Test framework logic error, somehow tool test resulted in more than one job."
job = jobs[0]

found_exceptions: List[Exception] = []

def register_exception(e: Exception):
Expand All @@ -1501,6 +1500,9 @@ def register_exception(e: Exception):
if testdef.outputs:
raise Exception("Cannot specify outputs in a test expecting failure.")

if not data_list and not data_collection_list:
Exception("Job did not produce any outputs")

maxseconds = testdef.maxseconds
# Wait for the job to complete and register expections if the final
# status was not what test was expecting.
Expand Down

0 comments on commit 012ab7d

Please sign in to comment.