22# Copyright (c) 2024 Scipp contributors (https://github.com/scipp)
33
44import numpy as np
5- import pytest
6- import scipp as sc
75
86import plopp as pp
97from plopp .data import examples
108
119
12- @pytest .fixture
13- def teapot_data ():
14- return sc .io .load_hdf5 (examples .teapot ())
15-
16-
17- def test_mesh3d_default (teapot_data ):
10+ def test_mesh3d_default ():
11+ teapot_data = examples .teapot ()
1812 pp .mesh3d (
1913 vertices = teapot_data ["vertices" ],
2014 faces = teapot_data ["faces" ],
2115 )
2216
2317
24- def test_mesh3d_solid_color (teapot_data ):
18+ def test_mesh3d_solid_color ():
19+ teapot_data = examples .teapot ()
2520 fig = pp .mesh3d (
2621 vertices = teapot_data ["vertices" ], faces = teapot_data ["faces" ], color = 'red'
2722 )
2823 (mesh ,) = fig .artists .values ()
2924 assert np .array_equal (mesh .geometry .attributes ["color" ].array [0 , :], (1 , 0 , 0 ))
3025
3126
32- def test_mesh3d_vertexcolors (teapot_data ):
27+ def test_mesh3d_vertexcolors ():
28+ teapot_data = examples .teapot ()
3329 z = teapot_data ["vertices" ].fields .z
3430 fig = pp .mesh3d (
3531 vertices = teapot_data ["vertices" ],
@@ -44,7 +40,8 @@ def test_mesh3d_vertexcolors(teapot_data):
4440 assert not np .array_equal (colors [imin , :], colors [imax , :])
4541
4642
47- def test_mesh3d_edgecolor (teapot_data ):
43+ def test_mesh3d_edgecolor ():
44+ teapot_data = examples .teapot ()
4845 fig = pp .mesh3d (
4946 vertices = teapot_data ["vertices" ],
5047 faces = teapot_data ["faces" ],
@@ -55,7 +52,8 @@ def test_mesh3d_edgecolor(teapot_data):
5552 assert mesh .edges .material .color == 'blue'
5653
5754
58- def test_mesh3d_cmap (teapot_data ):
55+ def test_mesh3d_cmap ():
56+ teapot_data = examples .teapot ()
5957 fig = pp .mesh3d (
6058 vertices = teapot_data ["vertices" ],
6159 faces = teapot_data ["faces" ],
0 commit comments