Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d90990b

Browse files
committed
Changed default slice to 9 for test histrogram and slice
1 parent e9abea9 commit d90990b

File tree

4 files changed

+6
-0
lines changed

4 files changed

+6
-0
lines changed
Loading
Loading

src/napari_matplotlib/tests/test_histogram.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ def test_histogram_2D(make_napari_viewer, astronaut_data):
2323
def test_histogram_3D(make_napari_viewer, brain_data):
2424
viewer = make_napari_viewer()
2525
viewer.add_image(brain_data[0], **brain_data[1])
26+
axis = viewer.dims.last_used
27+
slice_no = 9
28+
viewer.dims.set_current_step(axis, slice_no)
2629
fig = HistogramWidget(viewer).figure
2730
# Need to return a copy, as original figure is too eagerley garbage
2831
# collected by the widget

src/napari_matplotlib/tests/test_slice.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
def test_slice_3D(make_napari_viewer, brain_data):
1010
viewer = make_napari_viewer()
1111
viewer.add_image(brain_data[0], **brain_data[1])
12+
axis = viewer.dims.last_used
13+
slice_no = 9
14+
viewer.dims.set_current_step(axis, slice_no)
1215
fig = SliceWidget(viewer).figure
1316
# Need to return a copy, as original figure is too eagerley garbage
1417
# collected by the widget

0 commit comments

Comments
 (0)