File: skip_trimesh_tests.patch

package info (click to toggle)
python-pyvista 0.46.3-1~exp1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 177,564 kB
  • sloc: python: 94,482; sh: 129; makefile: 70
file content (30 lines) | stat: -rw-r--r-- 666 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
23
24
25
26
27
28
29
30
--- a/tests/core/test_helpers.py
+++ b/tests/core/test_helpers.py
@@ -5,7 +5,10 @@
 
 import numpy as np
 import pytest
-import trimesh
+try:
+    import trimesh
+except ImportError:
+    trimesh = None
 import vtk
 from vtk.util import numpy_support
 
@@ -19,7 +22,6 @@
 if TYPE_CHECKING:
     from pytest_mock import MockerFixture
 
-
 def test_wrap_none():
     # check against the "None" edge case
     assert pv.wrap(None) is None
@@ -86,6 +88,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]]