File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -825,8 +825,15 @@ def test_visual_settings(self, timeout=DEFAULT_TIMEOUT):
825825 self .widget .set_visual_settings (key , value )
826826 simulate .combobox_activate_item (self .widget .controls .attr_color ,
827827 self .data .domain [0 ].name )
828- simulate .combobox_activate_item (self .widget .controls .attr_shape ,
829- self .data .domain [4 ].name )
828+ variables = self .data .domain .variables + self .data .domain .metas
829+ discrete_var = next (
830+ (x for x in variables if isinstance (x , DiscreteVariable )), None
831+ )
832+ if discrete_var :
833+ # activate item only when discrete variable available
834+ simulate .combobox_activate_item (
835+ self .widget .controls .attr_shape , discrete_var .name
836+ )
830837 font .setPointSize (12 )
831838 self .assertFontEqual (graph .parameter_setter .num_legend .items [0 ][0 ].font , font )
832839
You can’t perform that action at this time.
0 commit comments