Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 32f9b87

Browse filesBrowse files
committed
Added 2D test for test_slice and 2D and 3D test images
1 parent 415a237 commit 32f9b87
Copy full SHA for 32f9b87

File tree

Expand file treeCollapse file tree

3 files changed

+11
-1
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+11
-1
lines changed
Loading
Loading

‎src/napari_matplotlib/tests/test_slice.py

Copy file name to clipboardExpand all lines: src/napari_matplotlib/tests/test_slice.py
+11-1Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.