1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
Index: python-pyvista/tests/core/test_helpers.py
===================================================================
--- python-pyvista.orig/tests/core/test_helpers.py 2024-11-10 13:21:43.237039282 +0100
+++ python-pyvista/tests/core/test_helpers.py 2024-11-27 18:30:44.171593061 +0100
@@ -2,7 +2,10 @@
import numpy as np
import pytest
-import trimesh
+try:
+ import trimesh
+except ImportError:
+ trimesh = None
import vtk
from vtk.util import numpy_support
@@ -13,7 +16,6 @@
from pyvista.core.utilities.arrays import set_default_active_scalars
from pyvista.core.utilities.points import make_tri_mesh
-
def test_wrap_none():
# check against the "None" edge case
assert pv.wrap(None) is None
@@ -52,6 +54,7 @@
assert wrapped.dtype == np_array.dtype
+@pytest.mark.skipif(trimesh is None, reason="requires trimesh")
def test_wrap_trimesh():
points = [[0, 0, 0], [0, 0, 1], [0, 1, 0]]
faces = [[0, 1, 2]]
|