File: test_svg.py

package info (click to toggle)
python-meshio 4.3.11-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 2,464 kB
  • sloc: python: 13,177; makefile: 50
file content (22 lines) | stat: -rw-r--r-- 445 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import pathlib
import tempfile

import helpers
import pytest

import meshio

test_set = [
    helpers.empty_mesh,
    helpers.line_mesh,
    helpers.tri_mesh,
    helpers.tri_mesh_2d,
    helpers.quad_mesh,
]


@pytest.mark.parametrize("mesh", test_set)
def test(mesh):
    with tempfile.TemporaryDirectory() as temp_dir:
        filepath = pathlib.Path(temp_dir) / "out.svg"
        meshio.write_points_cells(filepath, mesh.points, mesh.cells)