@@ -94,15 +94,15 @@ def test_select_points():
9494
9595def test_get_selection ():
9696 image = ImageWidget ()
97- marks = image .get_markers ()
97+ marks = image .get_all_markers ()
9898 assert isinstance (marks , Table ) or marks is None
9999
100100
101101def test_stop_marking ():
102102 image = ImageWidget ()
103103 # This is not much of a test...
104104 image .stop_marking (clear_markers = True )
105- assert image .get_markers () is None
105+ assert image .get_all_markers () is None
106106 assert image .is_marking is False
107107
108108
@@ -168,27 +168,27 @@ def test_reset_markers():
168168 image = ImageWidget ()
169169 # First test: this shouldn't raise any errors
170170 # (it also doesn't *do* anything...)
171- image .reset_markers ()
172- assert image .get_markers () is None
171+ image .remove_all_markers ()
172+ assert image .get_all_markers () is None
173173 table = Table (data = np .random .randint (0 , 100 , [5 , 2 ]),
174174 names = ['x' , 'y' ], dtype = ('int' , 'int' ))
175175 image .add_markers (table , x_colname = 'x' , y_colname = 'y' ,
176176 skycoord_colname = 'coord' , marker_name = 'test' )
177177 image .add_markers (table , x_colname = 'x' , y_colname = 'y' ,
178178 skycoord_colname = 'coord' , marker_name = 'test2' )
179- image .reset_markers ()
179+ image .remove_all_markers ()
180180 with pytest .raises (ValueError ):
181- image .get_markers ( marker_name = 'test' )
181+ image .get_markers_by_name ( 'test' )
182182 with pytest .raises (ValueError ):
183- image .get_markers ( marker_name = 'test2' )
183+ image .get_markers_by_name ( 'test2' )
184184
185185
186186def test_remove_markers ():
187187 image = ImageWidget ()
188188 # Add a tag name...
189189 image ._marktags .add (image ._default_mark_tag_name )
190190 with pytest .raises (ValueError ) as e :
191- image .remove_markers ('arf' )
191+ image .remove_markers_by_name ('arf' )
192192 assert 'arf' in str (e .value )
193193
194194
@@ -214,7 +214,7 @@ def test_cuts():
214214 # should raise an error.
215215 with pytest .raises (ValueError ) as e :
216216 image .cuts = (1 , 10 , 100 )
217- assert 'length 2 ' in str (e .value )
217+ assert 'Cut levels must be given as (low, high) ' in str (e .value )
218218
219219 # These ought to succeed
220220
@@ -283,7 +283,7 @@ def test_click_center():
283283 # If marking is in progress then setting click center should fail
284284 with pytest .raises (ValueError ) as e :
285285 image .click_center = True
286- assert 'Cannot set ' in str (e .value )
286+ assert 'Interactive marking is in progress ' in str (e .value )
287287
288288 # setting to False is fine though so no error is expected here
289289 image .click_center = False
0 commit comments