diff --git a/jdaviz/app.py b/jdaviz/app.py index 3b8dfef2ff..f483e118c7 100644 --- a/jdaviz/app.py +++ b/jdaviz/app.py @@ -290,8 +290,8 @@ def __init__(self, configuration=None, *args, **kwargs): # Imviz linking self._wcs_only_label = "_WCS_ONLY" + self._link_type = None if self.config == "imviz": - self._link_type = None self._wcs_use_affine = None # Subscribe to messages indicating that a new viewer needs to be diff --git a/jdaviz/configs/imviz/tests/test_linking.py b/jdaviz/configs/imviz/tests/test_linking.py index 3d1ac1c097..d529620037 100644 --- a/jdaviz/configs/imviz/tests/test_linking.py +++ b/jdaviz/configs/imviz/tests/test_linking.py @@ -41,8 +41,7 @@ class TestLink_WCS_NoWCS(BaseImviz_WCS_NoWCS, BaseLinkHandler): def test_wcslink_fallback_pixels(self): self.imviz.link_data(link_type='wcs', wcs_fallback_scheme='pixels', error_on_fail=True) - assert self.viewer.get_link_type('has_wcs[SCI,1]') == 'self' - assert self.viewer.get_link_type('no_wcs[SCI,1]') == 'pixels' + assert self.viewer.get_link_type('has_wcs[SCI,1]') == 'wcs' # Also check the coordinates display: Last loaded is on top. @@ -58,14 +57,6 @@ def test_wcslink_fallback_pixels(self): 'World 22h30m04.8674s -20d49m59.9990s (ICRS)', '337.5202808000 -20.8333330600 (deg)') - def test_wcslink_nofallback_noerror(self): - self.imviz.link_data(link_type='wcs', wcs_fallback_scheme=None) - self.check_all_pixel_links() # Keeps old links because operation failed silently - - def test_wcslink_nofallback_error(self): - with pytest.raises(ValueError, match='valid WCS'): - self.imviz.link_data(link_type='wcs', wcs_fallback_scheme=None, error_on_fail=True) - class TestLink_WCS_FakeWCS(BaseImviz_WCS_NoWCS, BaseLinkHandler):