8000 Added 2D test for test_slice and 2D and 3D test images · melissawm/napari-matplotlib@32f9b87 · GitHub
[go: up one dir, main page]

Skip to content

Commit 32f9b87

Browse files 8000
committed
Added 2D test for test_slice and 2D and 3D test images
1 parent 415a237 commit 32f9b87

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed
Loading
Loading

src/napari_matplotlib/tests/test_slice.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,20 @@
66

77

88
@pytest.mark.mpl_image_compare
9-
def test_slice(make_napari_viewer, brain_data):
9+
def test_slice_3D(make_napari_viewer, brain_data):
1010
viewer = make_napari_viewer()
1111
viewer.add_image(brain_data[0], **brain_data[1])
1212
fig = SliceWidget(viewer).figure
1313
# Need to return a copy, as original figure is too eagerley garbage
1414
# collected by the widget
1515
return deepcopy(fig)
16+
17+
18+
@pytest.mark.mpl_image_compare
19+
def test_slice_2D(make_napari_viewer, astronaut_data):
20+
viewer = make_napari_viewer()
21+
viewer.add_image(astronaut_data[0], **astronaut_data[1])
22+
fig = SliceWidget(viewer).figure
23+
# Need to return a copy, as original figure is too eagerley garbage
24+
# collected by the widget
25+
return deepcopy(fig)

0 commit comments

Comments
 (0)
0