only named arguments after *args
# -*- coding: utf-8 -*-
#
import copy
+from functools import partial
import pytest
import meshio
@@ -45,8 +46,7 @@ def gmsh_periodic():
)
@pytest.mark.parametrize("write_binary", [False, True])
def test_gmsh2(mesh, write_binary):
- def writer(*args, **kwargs):
- return meshio.msh_io.write(*args, "2", write_binary=write_binary, **kwargs)
+ writer = partial(meshio.msh_io.write, fmt_version="2", write_binary=write_binary)
helpers.write_read(writer, meshio.msh_io.read, mesh, 1.0e-15)
return
@@ -78,8 +78,7 @@ def test_gmsh2(mesh, write_binary):
)
@pytest.mark.parametrize("write_binary", [False, True])
def test_gmsh4(mesh, write_binary):
- def writer(*args, **kwargs):
- return meshio.msh_io.write(*args, "4", write_binary=write_binary, **kwargs)
+ writer = partial(meshio.msh_io.write, fmt_version="2", write_binary=write_binary)
helpers.write_read(writer, meshio.msh_io.read, mesh, 1.0e-15)
return
