From 1c82b6c2ada1e6f1c305314e227e6b1e19e12c48 Mon Sep 17 00:00:00 2001 From: Alexander Bills Date: Thu, 12 Dec 2024 08:42:05 -0800 Subject: [PATCH] begin working on tests --- src/pybamm/parameters/parameter_values.py | 12 ++++++------ .../unit/test_meshes/test_one_dimensional_submesh.py | 4 ++++ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/pybamm/parameters/parameter_values.py b/src/pybamm/parameters/parameter_values.py index ce26335347..8a0c1d62a1 100644 --- a/src/pybamm/parameters/parameter_values.py +++ b/src/pybamm/parameters/parameter_values.py @@ -604,12 +604,12 @@ def process_geometry(self, geometry): def process_and_check(sym): new_sym = self.process_symbol(sym) - if not isinstance(new_sym, pybamm.Scalar) and not isinstance( - new_sym, pybamm.InputParameter - ): - raise ValueError( - "Geometry parameters must be Scalars or InputParameters after parameter processing" - ) + #if not isinstance(new_sym, pybamm.Scalar) and not isinstance( + # new_sym, pybamm.InputParameter + #): + # raise ValueError( + # "Geometry parameters must be Scalars or InputParameters after parameter processing" + # ) return new_sym for domain in geometry: diff --git a/tests/unit/test_meshes/test_one_dimensional_submesh.py b/tests/unit/test_meshes/test_one_dimensional_submesh.py index 65462fa085..7349327c85 100644 --- a/tests/unit/test_meshes/test_one_dimensional_submesh.py +++ b/tests/unit/test_meshes/test_one_dimensional_submesh.py @@ -94,6 +94,10 @@ def test_exceptions(self): lims = {"a": 1, "b": 2} with pytest.raises(pybamm.GeometryError): pybamm.SymbolicUniform1DSubMesh(lims, None) + tabs = {"negative": {"z_centre": 0}, "positive": {"z_centre": 1}} + + with pytest.raises(NotImplementedError): + pybamm.SymbolicUniform1DSubMesh(lims, 20, tabs=tabs) def test_symmetric_mesh_creation_no_parameters(self, r, geometry): submesh_types = {"negative particle": pybamm.Uniform1DSubMesh}