mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
tool verification: move no output assertion
from planemo the verify_tool function is called from [within an try-except block](https://github.com/galaxyproject/planemo/blob/1aa3eb05a97ad20c0be6f6560ab5cec090e76612/planemo/engine/galaxy.py#L109) which silently catches any exception. Thus any exception raised from within verify_tool will not be detected, i.e. the assertion needs to be moved into `_verify_outputs` (which also seems to make sense by name) in order to make verify_tool record the problem properly.
This commit is contained in:
@@ -1430,8 +1430,6 @@ def verify_tool(
|
||||
raise e
|
||||
|
||||
if not expected_failure_occurred:
|
||||
assert data_list or data_collection_list
|
||||
|
||||
try:
|
||||
job_stdio = _verify_outputs(
|
||||
testdef, test_history, jobs, data_list, data_collection_list, galaxy_interactor, quiet=quiet
|
||||
@@ -1487,6 +1485,7 @@ def _handle_def_errors(testdef):
|
||||
|
||||
|
||||
def _verify_outputs(testdef, history, jobs, data_list, data_collection_list, galaxy_interactor, quiet=False):
|
||||
assert data_list or data_collection_list, "Tool produced no output data"
|
||||
assert len(jobs) == 1, "Test framework logic error, somehow tool test resulted in more than one job."
|
||||
job = jobs[0]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user