simplify gmsh test
@@ -5,7 +5,8 @@ import pytest
import helpers
-test_set = [
+
+@pytest.mark.parametrize('mesh', [
helpers.tri_mesh,
helpers.triangle6_mesh,
helpers.quad_mesh,
@@ -18,22 +19,11 @@ test_set = [
helpers.add_field_data(helpers.tri_mesh, [1, 2], int),
helpers.add_field_data(helpers.tet_mesh, [1, 3], int),
helpers.add_field_data(helpers.hex_mesh, [1, 3], int),
- ]
-
-
-@pytest.mark.parametrize('mesh', test_set)
-def test_gmsh(mesh):
- def writer(*args, **kwargs):
- return meshio.gmsh_io.write(*args, write_binary=False, **kwargs)
-
- helpers.write_read(writer, meshio.gmsh_io.read, mesh, 1.0e-15)
- return
-
-
-@pytest.mark.parametrize('mesh', test_set)
-def test_gmsh_binary(mesh):
+ ])
+@pytest.mark.parametrize('write_binary', [False, True])
+def test_gmsh(mesh, write_binary):
def writer(*args, **kwargs):
- return meshio.gmsh_io.write(*args, write_binary=True, **kwargs)
+ return meshio.gmsh_io.write(*args, write_binary=write_binary, **kwargs)
helpers.write_read(writer, meshio.gmsh_io.read, mesh, 1.0e-15)
return
