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 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319
|
Index: python-pyvista/tests/plotting/test_charts.py
===================================================================
--- python-pyvista.orig/tests/plotting/test_charts.py 2024-11-27 17:13:26.279251290 +0100
+++ python-pyvista/tests/plotting/test_charts.py 2024-11-27 17:13:26.267251181 +0100
@@ -2,6 +2,7 @@
from __future__ import annotations
+import importlib
import itertools
import platform
import weakref
@@ -35,6 +36,12 @@
pytestmark = pytest.mark.skip
+# charts fail if paraview is used to provide vtkmodules
+# since it does not provide vtkPythonContext2D
+if importlib.util.find_spec("paraview"):
+ pytestmark = pytest.mark.skip("paraview provides vtk without vtkPythonContext2D required for charts")
+
+
def vtk_array_to_tuple(arr):
return tuple(arr.GetValue(i) for i in range(arr.GetNumberOfValues()))
Index: python-pyvista/tests/plotting/test_plotting.py
===================================================================
--- python-pyvista.orig/tests/plotting/test_plotting.py 2024-11-27 17:13:26.279251290 +0100
+++ python-pyvista/tests/plotting/test_plotting.py 2024-11-27 17:13:26.271251217 +0100
@@ -8,6 +8,7 @@
from __future__ import annotations
import inspect
+import importlib
import io
import os
import pathlib
@@ -43,6 +44,11 @@
from collections.abc import Callable
from collections.abc import ItemsView
+# charts fail if paraview is used to provide vtkmodules
+# since it does not provide vtkPythonContext2D
+xfail_charts = pytest.mark.xfail(importlib.util.find_spec("paraview"),
+ reason="paraview provides vtk without vtkPythonContext2D required for charts")
+
# skip all tests if unable to render
pytestmark = pytest.mark.skip_plotting
@@ -2602,6 +2608,7 @@
@skip_mac
@pytest.mark.needs_vtk_version(9, 2, 0)
+@xfail_charts
def test_chart_plot():
"""Basic test to verify chart plots correctly"""
# Chart 1 (bottom left)
@@ -2669,6 +2676,7 @@
@skip_9_1_0
+@xfail_charts
def test_chart_matplotlib_plot(verify_image_cache):
"""Test integration with matplotlib"""
# Seeing CI failures for Conda job that need to be addressed
@@ -2700,6 +2708,7 @@
pl.show()
+@xfail_charts
def test_get_charts():
"""Test that the get_charts method is retuning a list of charts"""
chart = pv.Chart2D()
@@ -3424,6 +3433,7 @@
@skip_9_1_0
+@xfail_charts
def test_charts_sin():
x = np.linspace(0, 2 * np.pi, 20)
y = np.sin(x)
Index: python-pyvista/tests/core/test_polydata.py
===================================================================
--- python-pyvista.orig/tests/core/test_polydata.py 2024-11-27 17:13:26.279251290 +0100
+++ python-pyvista/tests/core/test_polydata.py 2024-11-27 17:13:26.271251217 +0100
@@ -1,5 +1,6 @@
from __future__ import annotations
+import importlib
from math import pi
import pathlib
from pathlib import Path
@@ -1121,6 +1122,8 @@
arc.extrude_rotate()
+@pytest.mark.xfail(importlib.util.find_spec("paraview"),
+ reason="paraview provides inconsistent vtk")
def test_flip_normals(sphere, plane):
sphere_flipped = sphere.copy()
sphere_flipped.flip_normals()
Index: python-pyvista/tests/core/test_dataset_filters.py
===================================================================
--- python-pyvista.orig/tests/core/test_dataset_filters.py 2024-11-27 17:13:26.279251290 +0100
+++ python-pyvista/tests/core/test_dataset_filters.py 2024-11-27 17:13:26.271251217 +0100
@@ -1,6 +1,7 @@
from __future__ import annotations
import functools
+import importlib
import itertools
from pathlib import Path
import platform
@@ -21,6 +22,9 @@
from pyvista.core.errors import NotAllTrianglesError
from pyvista.core.errors import VTKVersionError
+xfail_paraview = pytest.mark.xfail(importlib.util.find_spec("paraview"),
+ reason="paraview provides vtk without vtkImageDilateErode3D")
+
normals = ['x', 'y', '-z', (1, 1, 1), (3.3, 5.4, 0.8)]
skip_mac = pytest.mark.skipif(platform.system() == 'Darwin', reason="Flaky Mac tests")
@@ -3093,6 +3097,7 @@
)
+@xfail_paraview
def test_image_dilate_erode_output_type():
point_data = np.zeros((10, 10, 10))
point_data[4, 4, 4] = 1
@@ -3104,6 +3109,7 @@
assert isinstance(volume_dilate_erode, pv.ImageData)
+@xfail_paraview
def test_image_dilate_erode_dilation():
point_data = np.zeros((10, 10, 10))
point_data[4, 4, 4] = 1
@@ -3120,6 +3126,7 @@
)
+@xfail_paraview
def test_image_dilate_erode_erosion():
point_data = np.zeros((10, 10, 10))
point_data[4, 4, 4] = 1
@@ -3133,6 +3140,7 @@
)
+@xfail_paraview
def test_image_dilate_erode_cell_data_specified():
point_data = np.zeros((10, 10, 10))
cell_data = np.zeros((9, 9, 9))
@@ -3143,6 +3151,7 @@
volume.image_dilate_erode(scalars='cell_data')
+@xfail_paraview
def test_image_dilate_erode_cell_data_active():
point_data = np.zeros((10, 10, 10))
cell_data = np.zeros((9, 9, 9))
Index: python-pyvista/tests/core/test_reader.py
===================================================================
--- python-pyvista.orig/tests/core/test_reader.py 2024-11-27 17:13:26.279251290 +0100
+++ python-pyvista/tests/core/test_reader.py 2024-11-27 17:13:26.271251217 +0100
@@ -1,5 +1,6 @@
from __future__ import annotations
+import importlib
import os
from pathlib import Path
import platform
@@ -1041,6 +1042,8 @@
pv.vtk_version_info < (9, 1, 0),
reason="Requires VTK>=9.1.0 for a concrete PartitionedDataSetWriter class.",
)
+@pytest.mark.xfail(importlib.util.find_spec("paraview"),
+ reason="paraview provides inconsistent vtk")
def test_xmlpartitioneddatasetreader(tmpdir):
tmpfile = tmpdir.join("temp.vtpd")
partitions = pv.PartitionedDataSet(
Index: python-pyvista/tests/core/test_composite.py
===================================================================
--- python-pyvista.orig/tests/core/test_composite.py 2024-11-27 17:13:26.279251290 +0100
+++ python-pyvista/tests/core/test_composite.py 2024-11-27 17:13:26.271251217 +0100
@@ -1,5 +1,6 @@
from __future__ import annotations
+import importlib
import pathlib
import platform
import weakref
@@ -328,6 +329,8 @@
assert str(multi) is not None
+@pytest.mark.xfail(importlib.util.find_spec("paraview"),
+ reason="paraview provides inconsistent vtk")
def test_multi_block_eq(ant, sphere, uniform, airplane, tetbeam):
multi = multi_from_datasets(ant, sphere, uniform, airplane, tetbeam)
other = multi.copy()
Index: python-pyvista/tests/core/test_dataset.py
===================================================================
--- python-pyvista.orig/tests/core/test_dataset.py 2024-11-27 17:13:26.279251290 +0100
+++ python-pyvista/tests/core/test_dataset.py 2024-11-27 17:13:26.271251217 +0100
@@ -2,6 +2,7 @@
from __future__ import annotations
+import importlib
import multiprocessing
import pickle
from typing import TYPE_CHECKING
@@ -38,7 +39,6 @@
HYPOTHESIS_MAX_EXAMPLES = 20
-
@pytest.fixture()
def grid():
return pv.UnstructuredGrid(examples.hexbeamfile)
@@ -1154,6 +1154,8 @@
assert np.array_equal(in_cell, np.array([True, False]))
+@pytest.mark.xfail(importlib.util.find_spec("paraview"),
+ reason="paraview provides inconsistent vtk")
@pytest.mark.parametrize('pickle_format', ['xml', 'legacy'])
def test_serialize_deserialize(datasets, pickle_format):
pv.set_pickle_format(pickle_format)
Index: python-pyvista/tests/core/test_grid.py
===================================================================
--- python-pyvista.orig/tests/core/test_grid.py 2024-11-27 17:13:26.279251290 +0100
+++ python-pyvista/tests/core/test_grid.py 2024-11-27 17:13:26.271251217 +0100
@@ -1,5 +1,6 @@
from __future__ import annotations
+import importlib
import pathlib
from pathlib import Path
import weakref
@@ -824,6 +825,8 @@
assert np.allclose(structured.cell_data[k], v)
+@pytest.mark.xfail(importlib.util.find_spec("paraview"),
+ reason="paraview provides inconsistent vtk")
def test_create_image_data_from_specs():
# empty
grid = pv.ImageData()
Index: python-pyvista/tests/core/test_utilities.py
===================================================================
--- python-pyvista.orig/tests/core/test_utilities.py 2024-11-27 17:13:26.279251290 +0100
+++ python-pyvista/tests/core/test_utilities.py 2024-11-27 17:13:26.275251254 +0100
@@ -2,6 +2,7 @@
from __future__ import annotations
+import importlib
import json
import os
from pathlib import Path
@@ -520,6 +521,8 @@
alg.Update()
+@pytest.mark.xfail(importlib.util.find_spec("paraview"),
+ reason="paraview provides inconsistent vtk")
def test_vtk_error_catcher():
# raise_errors: False
error_catcher = pv.core.utilities.observers.VtkErrorCatcher()
Index: python-pyvista/tests/plotting/test_collection.py
===================================================================
--- python-pyvista.orig/tests/plotting/test_collection.py 2024-11-27 17:13:26.279251290 +0100
+++ python-pyvista/tests/plotting/test_collection.py 2024-11-27 17:13:26.275251254 +0100
@@ -3,9 +3,11 @@
from __future__ import annotations
import gc
+import importlib
import weakref
import numpy as np
+import pytest
import vtk
import pyvista as pv
@@ -48,6 +50,8 @@
pl.add_mesh(sphere, scalars=range(sphere.n_points))
+@pytest.mark.xfail(importlib.util.find_spec("paraview"),
+ reason="paraview provides vtk without vtkPythonContext2D required for charts")
def test_plotting_collection():
"""Ensure that we don't leak Plotter, Renderer and Charts instances."""
pl = pv.Plotter()
Index: python-pyvista/tests/core/test_dataobject.py
===================================================================
--- python-pyvista.orig/tests/core/test_dataobject.py 2024-11-27 17:13:26.279251290 +0100
+++ python-pyvista/tests/core/test_dataobject.py 2024-11-27 17:13:26.275251254 +0100
@@ -1,6 +1,7 @@
from __future__ import annotations
from collections import UserDict
+import importlib
import json
import numpy as np
@@ -14,6 +15,8 @@
assert sphere != [1, 2, 3]
+@pytest.mark.xfail(importlib.util.find_spec("paraview"),
+ reason="paraview provides inconsistent vtk")
def test_uniform_eq():
orig = examples.load_uniform()
copy = orig.copy(deep=True)
|