Skip to content

Commit

Permalink
Merge pull request #4946 from PrimozGodec/fix-ProjectionWidgetTestMixin
Browse files Browse the repository at this point in the history
[FIX] ProjectionWidgetMixinTests: set shape attribute only when discrete var available
  • Loading branch information
janezd authored Sep 4, 2020
2 parents 290c2a1 + ca9de36 commit 1895c41
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Orange/widgets/tests/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -825,8 +825,15 @@ def test_visual_settings(self, timeout=DEFAULT_TIMEOUT):
self.widget.set_visual_settings(key, value)
simulate.combobox_activate_item(self.widget.controls.attr_color,
self.data.domain[0].name)
simulate.combobox_activate_item(self.widget.controls.attr_shape,
self.data.domain[4].name)
variables = self.data.domain.variables + self.data.domain.metas
discrete_var = next(
(x for x in variables if isinstance(x, DiscreteVariable)), None
)
if discrete_var:
# activate item only when discrete variable available
simulate.combobox_activate_item(
self.widget.controls.attr_shape, discrete_var.name
)
font.setPointSize(12)
self.assertFontEqual(graph.parameter_setter.num_legend.items[0][0].font, font)

Expand Down

0 comments on commit 1895c41

Please sign in to comment.