Skip to content

Commit

Permalink
test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
kecnry committed Aug 2, 2024
1 parent cd60491 commit d9d1633
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@ def test_unit_translation(cubeviz_helper):
# data collection item units will be used for translations.
assert uc_plg._obj.flux_or_sb_selected == 'Flux'

# accessing from get_data(use_display_units=True) should return flux-like units
assert cubeviz_helper.get_data('Spectrum (sum)', use_display_units=True).unit == u.MJy

# to have access to display units
viewer_1d = cubeviz_helper.app.get_viewer(
cubeviz_helper._default_spectrum_viewer_reference_name)
Expand All @@ -165,6 +168,10 @@ def test_unit_translation(cubeviz_helper):
# check if units translated
assert y_display_unit == u.MJy / u.sr

# get_data(use_display_units=True) should return surface brightness-like units
# NOTE: should be updated to pix**2
assert cubeviz_helper.get_data('Spectrum (sum)', use_display_units=True).unit == u.MJy / u.pix


def test_sb_unit_conversion(cubeviz_helper):
# custom cube to have Surface Brightness units
Expand Down

0 comments on commit d9d1633

Please sign in to comment.