Skip to content

Might as well go for 100% coverage. #158

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/napari_matplotlib/tests/scatter/test_scatter.py
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@

import pytest

from napari_matplotlib import ScatterWidget
from napari_matplotlib import ScatterBaseWidget, ScatterWidget


@pytest.mark.mpl_image_compare
@@ -48,3 +48,10 @@ def test_scatter_3D(make_napari_viewer, brain_data):
viewer.layers.selection.add(viewer.layers[1])

return deepcopy(fig)


def test_get_data_notimplemented_on_base(make_napari_viewer):
viewer = make_napari_viewer()
widget = ScatterBaseWidget(viewer)
with pytest.raises(NotImplementedError):
widget._get_data()
3 changes: 3 additions & 0 deletions src/napari_matplotlib/tests/test_util.py
Original file line number Diff line number Diff line change
@@ -28,6 +28,9 @@ def test_interval():
with pytest.raises(ValueError, match="must be an integer"):
"string" in interval # type: ignore

with pytest.raises(ValueError, match="must be <= upper_bound"):
Interval(5, 3)


@pytest.mark.parametrize(
"lower, upper, text",