Skip to content

Commit c3b2f4b

Browse files
committed
Fix test with different error messages
1 parent a71ab9c commit c3b2f4b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/test_mesh.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,12 @@ def test_attr_error_with_3D_mesh_in_cylindrical():
212212

213213
@pytest.mark.parametrize("system", ["cyl", "cart", 1.0, "coucou", mesh_1D])
214214
def test_coordinate_system_setter(system):
215+
if isinstance(system, str):
216+
err_msg = "coordinate_system must be one of 'cartesian', 'cylindrical', or 'spherical'"
217+
else:
218+
err_msg = "coordinate_system must be of type str or CoordinateSystem"
215219
with pytest.raises(
216220
ValueError,
217-
match="coordinate_system must be one of 'cartesian', 'cylindrical', or 'spherical'",
221+
match=err_msg,
218222
):
219223
F.Mesh(mesh=mesh_3D, coordinate_system=system)

0 commit comments

Comments
 (0)