File tree Expand file tree Collapse file tree 3 files changed +4
-3
lines changed Expand file tree Collapse file tree 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):
177177 self .image .remove_all_markers ()
178178 assert len (self .image .get_marker_names ()) == 0
179179 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
181182
182183 with pytest .raises (ValueError , match = "No markers named 'test1'" ):
183184 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):
102102
103103 assert self .image .get_marker_names () == ['empty' , 'nowcs' ]
104104
105- marks = self .image .get_all_markers ()
105+ with pytest .warns (UserWarning , match = 'is empty' ):
106+ marks = self .image .get_all_markers ()
106107 assert len (marks ) == len (x )
107108 assert 'empty' not in marks ['marker name' ]
108109
Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ filterwarnings =
1111 ignore:numpy.ufunc size changed:RuntimeWarning
1212 ignore:numpy.ndarray size changed:RuntimeWarning
1313 ignore::DeprecationWarning:ginga
14- ignore:Marker set named:UserWarning
1514
1615[flake8]
1716# E501: line too long
You can’t perform that action at this time.
0 commit comments