Skip to content

Commit 5b91ebb

Browse files
committed
Add helper method for getting set of marker names
1 parent 57c8f4a commit 5b91ebb

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/astro_image_display_api/widget_api_test.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,14 @@ def _check_empty_marker_table_return_properties(self, table):
5454
assert len(table) == 0
5555
assert sorted(table.colnames) == sorted(['x', 'y', 'coord', 'marker name'])
5656

57+
def _get_marker_names_as_set(self):
58+
marks = self.image.get_markers(marker_name="all")["marker name"]
59+
if hasattr(marks, 'mask') and all(marks.mask):
60+
marker_names = set()
61+
else:
62+
marker_names = set(marks)
63+
return marker_names
64+
5765
def test_default_marker_names(self):
5866
# Check only that default names are set to a non-empty string
5967
assert self.image.DEFAULT_MARKER_NAME

0 commit comments

Comments
 (0)