Skip to content

Commit 0e71ccd

Browse files
Skip embree test when embree is unavailable (#367)
1 parent bff3f88 commit 0e71ccd

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

tests/test_skinseg.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
import numpy as np
66
import pytest
7+
import trimesh
78
import vtk
89
from scipy.linalg import expm
910
from scipy.stats import skew
@@ -111,7 +112,15 @@ def test_create_closed_surface_from_labelmap():
111112
# isn't supposed to add a colormap or anything like that
112113
assert surface.GetPointData().GetScalars() is None
113114

114-
@pytest.mark.parametrize("use_embree", [True, False])
115+
@pytest.mark.parametrize(
116+
"use_embree",
117+
[
118+
False,
119+
pytest.param(
120+
True,
121+
marks = pytest.mark.skipif(not trimesh.ray.has_embree, reason="Embree not available (needs x86 architecture)")
122+
)
123+
])
115124
def test_spherical_interpolator_from_mesh(use_embree):
116125
"""Check using a torus that the spherical interpolator behaves reasonably"""
117126
parametric_torus = vtk.vtkParametricTorus()

0 commit comments

Comments
 (0)