Skip to content

Commit

Permalink
rename test data names to avoid confusion
Browse files Browse the repository at this point in the history
* see added inline comment
  • Loading branch information
kecnry committed May 19, 2022
1 parent 53c04d5 commit ec6166f
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions jdaviz/configs/cubeviz/plugins/tests/test_data_selection.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@
@pytest.mark.filterwarnings('ignore:No observer defined on WCS')
def test_moment_calculation(cubeviz_helper, spectrum1d_cube, tmpdir):
app = cubeviz_helper.app
app.add_data(spectrum1d_cube, 'test[FLUX]')
app.add_data(spectrum1d_cube, 'test[IVAR]')
app.add_data_to_viewer('flux-viewer', 'test[FLUX]')
# NOTE: these are the same underlying data. This works fine for the current scope
# of the tests (to make sure checking/unchecking operations change the data exposed
# in the viewer), but will need to be more advanced if we extend tests here to
# cover scrubbing/linking/etc
app.add_data(spectrum1d_cube, 'cube1')
app.add_data(spectrum1d_cube, 'cube2')
app.add_data_to_viewer('flux-viewer', 'cube1')
fv = app.get_viewer('flux-viewer')

assert len(app.state.data_items) == 2
Expand Down

0 comments on commit ec6166f

Please sign in to comment.