From cffc1f468a18f62df56a7c6b98a5f09310423ce3 Mon Sep 17 00:00:00 2001 From: Alex Fikl Date: Wed, 6 Jun 2018 19:43:08 -0500 Subject: [PATCH] tests: skip if pymetis is not available --- test/test_meshmode.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/test_meshmode.py b/test/test_meshmode.py index 29dc2ed1..9e879149 100644 --- a/test/test_meshmode.py +++ b/test/test_meshmode.py @@ -68,6 +68,8 @@ def test_partition_torus_mesh(): def test_partition_boxes_mesh(): + pymetis = pytest.importorskip('pymetis') + n = 5 num_parts = 7 from meshmode.mesh.generation import generate_regular_rect_mesh @@ -84,8 +86,7 @@ def test_partition_boxes_mesh(): for n in range(starts[elem], starts[elem + 1]): adjacency_list[elem].add(mesh.nodal_adjacency.neighbors[n]) - from pymetis import part_graph - (_, p) = part_graph(num_parts, adjacency=adjacency_list) + (_, p) = pymetis.part_graph(num_parts, adjacency=adjacency_list) part_per_element = np.array(p) from meshmode.mesh.processing import partition_mesh -- GitLab