File tree Expand file tree Collapse file tree 2 files changed +14
-5
lines changed
src/napari_matplotlib/tests Expand file tree Collapse file tree 2 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -17,3 +17,8 @@ def image_data(request):
1717@pytest .fixture
1818def astronaut_data ():
1919 return data .astronaut (), {"rgb" : True }
20+
21+
22+ @pytest .fixture
23+ def brain_data ():
24+ return data .brain (), {"rgb" : False }
Original file line number Diff line number Diff line change 1- import numpy as np
1+ import pytest
22
33from napari_matplotlib import SliceWidget
44
55
6- def test_scatter (make_napari_viewer ):
7- # Smoke test adding a histogram widget
6+ @pytest .mark .mpl_image_compare
7+ def test_slice (make_napari_viewer , brain_data ):
8+ # Smoke test adding a slice widget
89 viewer = make_napari_viewer ()
9- viewer .add_image (np .random .random ((100 , 100 , 100 )))
10- SliceWidget (viewer )
10+ viewer .add_image (
11+ brain_data [0 ], ** brain_data [1 ]
12+ ) # (np.random.random((100, 100, 100)))
13+ fig = SliceWidget (viewer ).figure
14+ return fig
You can’t perform that action at this time.
0 commit comments