'From and To spins and number of rows in a scores table changes.
GH-2172'

def test_from_to_table(self):

    table = Table('iris')
    (k_from, k_to) = (2, 9)
    self.widget.controls.k_from.setValue(k_from)
    self.send_signal(self.widget.Inputs.data, table)
    check = (lambda x: (2 if (((x - k_from) + 1) < 2) else ((x - k_from) + 1)))
    for i in range(k_from, k_to):
        self.widget.controls.k_to.setValue(i)
        self.assertEqual(len(self.widget.table_view.model().scores), check(i))
    for i in range(k_to, k_from, (-1)):
        self.widget.controls.k_to.setValue(i)
        self.assertEqual(len(self.widget.table_view.model().scores), check(i))
