Skip to content

Commit

Permalink
Add overlap test to scatterplot.
Browse files Browse the repository at this point in the history
  • Loading branch information
thocevar committed Aug 24, 2018
1 parent e7e3bc9 commit a03e6ac
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Orange/widgets/visualize/tests/test_owscatterplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from AnyQt.QtWidgets import QToolTip

from Orange.data import Table, Domain, ContinuousVariable, DiscreteVariable
from Orange.widgets.utils.plot import OWPlotGUI
from Orange.widgets.visualize.owscatterplotgraph import MAX
from Orange.widgets.widget import AttributeList
from Orange.widgets.tests.base import WidgetTest, WidgetOutputsTestMixin, datasets
Expand Down Expand Up @@ -174,6 +175,13 @@ def test_points_combo_boxes(self):
self.assertEqual(graph.attr_color.currentText(),
self.data.domain.class_var.name)

def test_overlap(self):
self.send_signal(self.widget.Inputs.data, Table("iris"))
self.assertEqual(len(set(self.widget.graph.compute_sizes())), 1)
simulate.combobox_activate_item(self.widget.controls.graph.attr_size,
OWPlotGUI.SizeByOverlap)
self.assertGreater(len(set(self.widget.graph.compute_sizes())), 1)

def test_group_selections(self):
self.send_signal(self.widget.Inputs.data, self.data)
graph = self.widget.graph
Expand Down

0 comments on commit a03e6ac

Please sign in to comment.