From 35e1fdb0d6a2b722d4a2dee38740a376d01940a3 Mon Sep 17 00:00:00 2001 From: Scott Marquis Date: Sun, 22 Mar 2020 14:08:24 +0000 Subject: [PATCH] #880 fixed tests --- pybamm/models/base_model.py | 4 ++-- tests/unit/test_models/test_base_model.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pybamm/models/base_model.py b/pybamm/models/base_model.py index 5d0efe1029..718c4bb348 100644 --- a/pybamm/models/base_model.py +++ b/pybamm/models/base_model.py @@ -399,12 +399,12 @@ def check_for_time_derivatives(self): if isinstance(node, pybamm.VariableDot): raise pybamm.ModelError( "time derivative of variable" - + "found ({}) in rhs equation {}".format(node, key) + + " found ({}) in rhs equation {}".format(node, key) ) if isinstance(node, pybamm.StateVectorDot): raise pybamm.ModelError( "time derivative of state vector" - + "found ({}) in rhs equation {}".format(node, key) + + " found ({}) in rhs equation {}".format(node, key) ) # Check that no variable time derivatives exist in the algebraic equations diff --git a/tests/unit/test_models/test_base_model.py b/tests/unit/test_models/test_base_model.py index c1189c2f22..fe642ec57b 100644 --- a/tests/unit/test_models/test_base_model.py +++ b/tests/unit/test_models/test_base_model.py @@ -92,7 +92,7 @@ def test_variables_set_get(self): variables = {"c": "alpha", "d": "beta"} model.variables = variables self.assertEqual(variables, model.variables) - self.assertEqual(model.variable_names, list(variables.keys())) + self.assertEqual(model.variable_names(), list(variables.keys())) def test_jac_set_get(self): model = pybamm.BaseModel()