From f19f4ae0c3cbcf750e39b41d22f570985d50983c Mon Sep 17 00:00:00 2001 From: Matthias Bernt Date: Mon, 15 May 2023 18:53:36 +0200 Subject: [PATCH] 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. --- lib/galaxy/tool_util/verify/interactor.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/galaxy/tool_util/verify/interactor.py b/lib/galaxy/tool_util/verify/interactor.py index da4bf13baf3..f4f09bd0403 100644 --- a/lib/galaxy/tool_util/verify/interactor.py +++ b/lib/galaxy/tool_util/verify/interactor.py @@ -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]