'Should not fail when there are no values set.
GH-2417'

def test_discrete_no_values(self):

    data = Table('iris')
    self.widget.setData(data)
    discreteFeatureEditor = DiscreteFeatureEditor()
    discreteFeatureEditor.valuesedit.setText('')
    discreteFeatureEditor.nameedit.setText('D1')
    discreteFeatureEditor.expressionedit.setText('iris')
    self.widget.addFeature(discreteFeatureEditor.editorData())
    self.assertFalse(self.widget.Error.more_values_needed.is_shown())
    self.widget.apply()
    self.assertTrue(self.widget.Error.more_values_needed.is_shown())
