diff --git a/biosimulators_cobrapy/core.py b/biosimulators_cobrapy/core.py index e6c85f8..608d3be 100644 --- a/biosimulators_cobrapy/core.py +++ b/biosimulators_cobrapy/core.py @@ -81,9 +81,15 @@ def exec_sed_task(task, variables, log=None): ''' log = log or TaskLog() - validation.validate_model_language(task.model.language, ModelLanguage.SBML) - validation.validate_model_change_types(task.model.changes, ()) - validation.validate_simulation_type(task.simulation, (SteadyStateSimulation, )) + model = task.model + sim = task.simulation + + raise_errors_warnings(validation.validate_model_language(task.model.language, ModelLanguage.SBML), + error_summary='Language for model `{}` is not supported.'.format(model.id)) + raise_errors_warnings(validation.validate_model_change_types(task.model.changes, ()), + error_summary='Changes for model `{}` are not supported.'.format(model.id)) + raise_errors_warnings(validation.validate_simulation_type(task.simulation, (SteadyStateSimulation, )), + error_summary='{} `{}` is not supported.'.format(sim.__class__.__name__, sim.id)) target_x_paths_ids = validation.validate_variable_xpaths( variables, task.model.source, attr='id') namespaces = get_namespaces_for_xml_doc(etree.parse(task.model.source)) diff --git a/tests/test_core_main.py b/tests/test_core_main.py index 2913918..80cb1b6 100644 --- a/tests/test_core_main.py +++ b/tests/test_core_main.py @@ -41,8 +41,7 @@ def setUp(self): self.dirname = tempfile.mkdtemp() def tearDown(self): - #shutil.rmtree(self.dirname) - print(self.dirname) + shutil.rmtree(self.dirname) def test_exec_sed_task_successfully(self): task = sedml_data_model.Task( @@ -263,7 +262,6 @@ def _build_combine_archive(self, model_changes=None, algorithm=None): 'archive.omex' if algorithm is None else 'archive-{}.omex'.format(algorithm.kisao_id)) CombineArchiveWriter().run(archive, archive_dirname, archive_filename) - print(archive_filename) return (doc, archive_filename) def _build_sed_doc(self, model_changes=None, algorithm=None):