File tree 3 files changed +4
-3
lines changed
3 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -177,7 +177,8 @@ def test_add_markers(self):
177
177
self .image .remove_all_markers ()
178
178
assert len (self .image .get_marker_names ()) == 0
179
179
assert self .image .get_all_markers () is None
180
- assert self .image .get_markers_by_name (self .image ._default_mark_tag_name ) is None
180
+ with pytest .warns (UserWarning , match = 'is empty' ):
181
+ assert self .image .get_markers_by_name (self .image ._default_mark_tag_name ) is None
181
182
182
183
with pytest .raises (ValueError , match = "No markers named 'test1'" ):
183
184
self .image .get_markers_by_name ('test1' )
Original file line number Diff line number Diff line change @@ -102,7 +102,8 @@ def test_empty_marker_name_works_with_all(self):
102
102
103
103
assert self .image .get_marker_names () == ['empty' , 'nowcs' ]
104
104
105
- marks = self .image .get_all_markers ()
105
+ with pytest .warns (UserWarning , match = 'is empty' ):
106
+ marks = self .image .get_all_markers ()
106
107
assert len (marks ) == len (x )
107
108
assert 'empty' not in marks ['marker name' ]
108
109
Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ filterwarnings =
11
11
ignore:numpy.ufunc size changed:RuntimeWarning
12
12
ignore:numpy.ndarray size changed:RuntimeWarning
13
13
ignore::DeprecationWarning:ginga
14
- ignore:Marker set named:UserWarning
15
14
16
15
[flake8]
17
16
# E501: line too long
You can’t perform that action at this time.
0 commit comments