Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
cshanahan1 committed Apr 2, 2024
1 parent db96a00 commit bdfadfb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
13 changes: 7 additions & 6 deletions jdaviz/configs/default/plugins/export/tests/test_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,13 +229,14 @@ def test_basic_export_plugin_plots(tmp_path, imviz_helper):
export_plugin.plot.selected = 'Plot Options:stretch_hist'

assert export_plugin.plot_format.selected == 'png' # should be default format
# just check that it doesn't crash, since we can't download
export_plugin.export()
# and change file type
export_plugin.plot_format.selected = 'svg'

export_plugin.filename == 'imviz_export'
# change filename
export_plugin.filename = 'test_export_plugin_plot'
# and change file type
export_plugin.plot_format.selected = 'svg'

# just check that it doesn't crash, since we can't download
export_plugin.export()

# make sure that the only valid option for export is this plugin,
Expand Down Expand Up @@ -273,11 +274,11 @@ def test_ap_phot_plot_export(tmp_path, imviz_helper):
assert 'Aperture Photometry:plot' in available_plots

export_plugin.plot.selected = 'Aperture Photometry:plot'
# just check that it doesn't crash, since we can't download
export_plugin.export()

# change filename
export_plugin.filename = 'test_export_plugin_plot'
# and change file type
export_plugin.plot_format.selected = 'svg'

# just check that it doesn't crash, since we can't download
export_plugin.export()
2 changes: 1 addition & 1 deletion jdaviz/core/template_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -4501,7 +4501,7 @@ def _remove_data(self, label):
self.viewer.remove_data(dc_entry)
self.app.data_collection.remove(dc_entry)

self._plugin.session.hub.broadcast(PluginTableModifiedMessage(sender=self))
self._plugin.session.hub.broadcast(PluginPlotModifiedMessage(sender=self))

def _update_data(self, label, reset_lims=False, **kwargs):
self._check_valid_components(**kwargs)
Expand Down

0 comments on commit bdfadfb

Please sign in to comment.