xdmf: more tests
@@ -8,15 +8,23 @@ import legacy_reader
vtk = pytest.importorskip('vtk')
-
-@pytest.mark.skipif(not hasattr(vtk, 'vtkXdmf3Writer'), reason='Need XDMF3')
-@pytest.mark.parametrize('mesh', [
+test_set = [
helpers.tri_mesh,
+ helpers.triangle6_mesh,
helpers.quad_mesh,
+ helpers.quad8_mesh,
+ helpers.tri_quad_mesh,
helpers.tet_mesh,
+ helpers.tet10_mesh,
+ helpers.hex_mesh,
+ helpers.hex20_mesh,
helpers.add_point_data(helpers.tri_mesh, 1),
- helpers.add_cell_data(helpers.tri_mesh, 1)
- ])
+ helpers.add_cell_data(helpers.tri_mesh, 1),
+ ]
+
+
+@pytest.mark.skipif(not hasattr(vtk, 'vtkXdmf3Writer'), reason='Need XDMF3')
+@pytest.mark.parametrize('mesh', test_set)
def test_xdmf3(mesh):
helpers.write_read(
meshio.xdmf_io.write,
@@ -27,13 +35,7 @@ def test_xdmf3(mesh):
@pytest.mark.skipif(not hasattr(vtk, 'vtkXdmf3Writer'), reason='Need XDMF3')
-@pytest.mark.parametrize('mesh', [
- helpers.tri_mesh,
- helpers.quad_mesh,
- helpers.tet_mesh,
- helpers.add_point_data(helpers.tri_mesh, 1),
- helpers.add_cell_data(helpers.tri_mesh, 1)
- ])
+@pytest.mark.parametrize('mesh', test_set)
def test_xdmf3_legacy_writer(mesh):
# test with legacy writer
def legacy_writer(*args, **kwargs):
@@ -48,13 +50,7 @@ def test_xdmf3_legacy_writer(mesh):
@pytest.mark.skipif(not hasattr(vtk, 'vtkXdmf3Reader'), reason='Need XDMF3')
-@pytest.mark.parametrize('mesh', [
- helpers.tri_mesh,
- helpers.quad_mesh,
- helpers.tet_mesh,
- helpers.add_point_data(helpers.tri_mesh, 1),
- helpers.add_cell_data(helpers.tri_mesh, 1)
- ])
+@pytest.mark.parametrize('mesh', test_set)
def test_xdmf3_legacy_reader(mesh):
# test with legacy reader
def lr(filename):
@@ -69,13 +65,7 @@ def test_xdmf3_legacy_reader(mesh):
@pytest.mark.skipif(not hasattr(vtk, 'vtkXdmfWriter'), reason='Need XDMF3')
-@pytest.mark.parametrize('mesh', [
- helpers.tri_mesh,
- helpers.quad_mesh,
- helpers.tet_mesh,
- helpers.add_point_data(helpers.tri_mesh, 1),
- helpers.add_cell_data(helpers.tri_mesh, 1)
- ])
+@pytest.mark.parametrize('mesh', test_set)
def test_xdmf2_legacy_writer(mesh):
# test with legacy writer
def legacy_writer(*args, **kwargs):
