Skip to content

Commit

Permalink
Coverage toggle test
Browse files Browse the repository at this point in the history
  • Loading branch information
duytnguyendtn committed Jul 22, 2024
1 parent 7941aa4 commit c6dbe8f
Showing 1 changed file with 30 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,33 @@ def test_autocenter_coords(self):
assert vo_plugin.source == "337.51924057481 -20.83208305686149"


@pytest.mark.remote_data
def test_M32(self):
pass
@pytest.mark.remote_data
class TestVOImvizRemote():

def _init_voplugin(self, imviz_helper):
vo_plugin = imviz_helper.plugins[vo_plugin_label]._obj

# Sets common args for Remote Testing
vo_plugin.viewer_selected = "Manual"
vo_plugin.source = "M32"
vo_plugin.waveband_selected = "infrared"

return vo_plugin

def test_coverage_toggle(self, imviz_helper):
# Set Common Args
vo_plugin = self._init_voplugin(imviz_helper)

# Retrieve registry options with filtering on
vo_plugin.resource_filter_coverage = True
vo_plugin.vue_query_registry_resources()
filtered_resources = vo_plugin.resources
assert len(filtered_resources) > 0

# Retrieve registry options with filtering off
vo_plugin.resource_filter_coverage = False
vo_plugin.vue_query_registry_resources()
nonfiltered_resources = vo_plugin.resources

# Nonfiltered resources should be more than filtered resources
assert len(nonfiltered_resources) > len(filtered_resources)

0 comments on commit c6dbe8f

Please sign in to comment.