Skip to content

Commit

Permalink
test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
kecnry committed Dec 21, 2023
1 parent badd462 commit 8a9dfdf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ API Changes
- ``width`` argument in Line Analysis plugin is renamed to ``continuum_width`` and ``width``
will be removed in a future release. [#2587]

- New API access to ``viz.data_labels``, ``viewer.data_labels_visible`` and
- New API access to ``viz.data_labels``, ``viewer.data_labels_visible``, and
``viewer.data_labels_loaded``. [#2626]

Cubeviz
Expand Down
9 changes: 9 additions & 0 deletions jdaviz/tests/test_user_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,12 @@ def test_specviz_zoom_level(specviz_helper):
assert v._obj.state.x_max == 2
assert v._obj.state.y_min == 1
assert v._obj.state.y_max == 2


def test_specviz_data_labels(specviz_helper, spectrum1d):
label = "Test 1D Spectrum"
specviz_helper.load_data(spectrum1d, data_label=label)

assert specviz_helper.data_labels == [label]
assert specviz_helper.viewers['spectrum-viewer'].data_labels_loaded == [label]
assert specviz_helper.viewers['spectrum-viewer'].data_labels_visible == [label]

0 comments on commit 8a9dfdf

Please # to comment.