From f005bbe9ef1312c5846ee17888263f1ac2ca076e Mon Sep 17 00:00:00 2001 From: "Frank T. Bergmann" Date: Tue, 19 Nov 2024 19:17:46 +0100 Subject: [PATCH] - silence misleading error message --- basico/task_steadystate.py | 1 + tests/test_mca.py | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/basico/task_steadystate.py b/basico/task_steadystate.py index 6db3ddb..1d3e28f 100644 --- a/basico/task_steadystate.py +++ b/basico/task_steadystate.py @@ -88,6 +88,7 @@ def run_steadystate(**kwargs): logger.error("Error while initializing the simulation: " + model_info.get_copasi_messages(num_messages_before, 'No output')) else: + num_messages_before = COPASI.CCopasiMessage.size() task.setCallBack(get_default_handler()) result = task.processRaw(use_initial_values) diff --git a/tests/test_mca.py b/tests/test_mca.py index 32dcc21..e1d8c15 100644 --- a/tests/test_mca.py +++ b/tests/test_mca.py @@ -23,6 +23,18 @@ def test_run(self): flux_control_coefficients = basico.get_flux_control_coefficients() self.assertIsNotNone(flux_control_coefficients) +class TestMCAYeast(unittest.TestCase): + def setUp(self): + basico.load_example('YeastGly') + self.assertIsNotNone(basico.get_species('ATP', exact=True)) + + def test_steadystate(self): + result = basico.run_steadystate() + self.assertTrue(result) + species = basico.get_species() + self.assertIsNotNone(species) + + if __name__ == '__main__':