'Test scores without running vizrank.
GH-2299
GH-2036'

def test_scores(self):

    SCORES = {('status',): 4.35e-40, ('sex',): 6.18e-100, ('age',): 2.82e-05, ('sex', 'status'): 1.06e-123, ('age', 'status'): 4.15e-47, ('age', 'sex'): 5.49e-102, ('age', 'sex', 'status'): 5.3e-128}
    table = Table('titanic')
    self.send_signal(self.widget.Inputs.data, table)
    self.vizrank.compute_attr_order()
    self.widget.vizrank.max_attrs = 3
    state = None
    for state in self.vizrank.iterate_states(state):
        self.vizrank.iterate_states(state)
        attrlist = tuple(sorted((self.vizrank.attr_ordering[i].name for i in state)))
        sc = self.vizrank.compute_score(state)
        self.assertTrue(np.allclose(sc, SCORES[attrlist], rtol=0.003, atol=0))
