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 d5a6213

Browse filesBrowse files
committed
Might as well go for 100% coverage.
At least in the source code.
1 parent 7862618 commit d5a6213
Copy full SHA for d5a6213

File tree

2 files changed

+11
-1
lines changed
Filter options

2 files changed

+11
-1
lines changed

‎src/napari_matplotlib/tests/scatter/test_scatter.py

Copy file name to clipboardExpand all lines: src/napari_matplotlib/tests/scatter/test_scatter.py
+8-1Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import pytest
44

5-
from napari_matplotlib import ScatterWidget
5+
from napari_matplotlib import ScatterBaseWidget, ScatterWidget
66

77

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

5050
return deepcopy(fig)
51+
52+
53+
def test_get_data_notimplemented_on_base(make_napari_viewer):
54+
viewer = make_napari_viewer()
55+
widget = ScatterBaseWidget(viewer)
56+
with pytest.raises(NotImplementedError):
57+
widget._get_data()

‎src/napari_matplotlib/tests/test_util.py

Copy file name to clipboardExpand all lines: src/napari_matplotlib/tests/test_util.py
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ def test_interval():
2828
with pytest.raises(ValueError, match="must be an integer"):
2929
"string" in interval # type: ignore
3030

31+
with pytest.raises(ValueError, match="must be <= upper_bound"):
32+
Interval(5, 3)
33+
3134

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

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.