simplify ansys test
@@ -13,24 +13,12 @@ import helpers
helpers.tet_mesh,
helpers.hex_mesh,
])
-def test_ascii(mesh):
+@pytest.mark.parametrize('write_binary', [False, True])
+def test(mesh, write_binary):
def writer(*args, **kwargs):
- return meshio.ansys_io.write(*args, write_binary=False, **kwargs)
-
- helpers.write_read(writer, meshio.ansys_io.read, mesh, 1.0e-15)
- return
-
-
-@pytest.mark.parametrize('mesh', [
- helpers.tri_mesh,
- helpers.quad_mesh,
- helpers.tri_quad_mesh,
- helpers.tet_mesh,
- helpers.hex_mesh,
- ])
-def test_binary(mesh):
- def writer(*args, **kwargs):
- return meshio.ansys_io.write(*args, write_binary=True, **kwargs)
+ return meshio.ansys_io.write(
+ *args, write_binary=write_binary, **kwargs
+ )
helpers.write_read(writer, meshio.ansys_io.read, mesh, 1.0e-15)
return
