Skip to content

Commit 2413b53

Browse files
committed
Resolves #96.
Not a nice global fix, but by setting the test fixture viewer's theme to light, napari-matplotlib will give axes dark grey axes, labels, and ticks.
1 parent c9db0ba commit 2413b53

10 files changed

+6
-0
lines changed
3.83 KB
Loading
3.42 KB
Loading
1.83 KB
Loading
1.87 KB
Loading
Loading
Loading

Diff for: src/napari_matplotlib/tests/scatter/test_scatter.py

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
@pytest.mark.mpl_image_compare
99
def test_scatter_2D(make_napari_viewer, astronaut_data):
1010
viewer = make_napari_viewer()
11+
viewer.theme = "light"
1112
widget = ScatterWidget(viewer)
1213
fig = widget.figure
1314

Diff for: src/napari_matplotlib/tests/scatter/test_scatter_features.py

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
@pytest.mark.mpl_image_compare
1212
def test_features_scatter_widget_2D(make_napari_viewer):
1313
viewer = make_napari_viewer()
14+
viewer.theme = "light"
1415
widget = FeaturesScatterWidget(viewer)
1516

1617
# make the points data

Diff for: src/napari_matplotlib/tests/test_histogram.py

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
@pytest.mark.mpl_image_compare
1313
def test_histogram_2D(make_napari_viewer, astronaut_data):
1414
viewer = make_napari_viewer()
15+
viewer.theme = "light"
1516
viewer.add_image(astronaut_data[0], **astronaut_data[1])
1617
fig = HistogramWidget(viewer).figure
1718
# Need to return a copy, as original figure is too eagerley garbage
@@ -22,6 +23,7 @@ def test_histogram_2D(make_napari_viewer, astronaut_data):
2223
@pytest.mark.mpl_image_compare
2324
def test_histogram_3D(make_napari_viewer, brain_data):
2425
viewer = make_napari_viewer()
26+
viewer.theme = "light"
2527
viewer.add_image(brain_data[0], **brain_data[1])
2628
fig = HistogramWidget(viewer).figure
2729
# Need to return a copy, as original figure is too eagerley garbage

Diff for: src/napari_matplotlib/tests/test_slice.py

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
@pytest.mark.mpl_image_compare
99
def test_slice_3D(make_napari_viewer, brain_data):
1010
viewer = make_napari_viewer()
11+
viewer.theme = "light"
1112
viewer.add_image(brain_data[0], **brain_data[1])
1213
fig = SliceWidget(viewer).figure
1314
# Need to return a copy, as original figure is too eagerley garbage
@@ -18,6 +19,7 @@ def test_slice_3D(make_napari_viewer, brain_data):
1819
@pytest.mark.mpl_image_compare
1920
def test_slice_2D(make_napari_viewer, astronaut_data):
2021
viewer = make_napari_viewer()
22+
viewer.theme = "light"
2123
viewer.add_image(astronaut_data[0], **astronaut_data[1])
2224
fig = SliceWidget(viewer).figure
2325
# Need to return a copy, as original figure is too eagerley garbage

0 commit comments

Comments
 (0)