'MosaicVizrank correctly computes the number of combinations'

def test_count(self):

    widget = self.widget
    vizrank = self.vizrank
    data = self.iris
    attributes = [v for v in data.domain.attributes[1:]]
    metas = [data.domain.attributes[0]]
    domain = Domain(attributes, data.domain.class_var, metas)
    new_data = data.from_table(domain, data)
    widget.set_data(new_data)
    for data in [self.iris, new_data]:
        widget.set_data(data)
        simulate.combobox_activate_index(self.widget.controls.variable_color, 0, 0)
        self.assertTrue((widget.interior_coloring == widget.PEARSON))
        vizrank.max_attrs = 2
        self.assertEqual(vizrank.state_count(), 10)
        vizrank.max_attrs = 3
        self.assertEqual(vizrank.state_count(), 20)
        vizrank.max_attrs = 4
        self.assertEqual(vizrank.state_count(), 25)
        simulate.combobox_activate_index(self.widget.controls.variable_color, 2, 0)
        self.assertTrue((widget.interior_coloring == widget.CLASS_DISTRIBUTION))
        vizrank.max_attrs = 2
        self.assertEqual(vizrank.state_count(), 10)
        vizrank.max_attrs = 3
        self.assertEqual(vizrank.state_count(), 14)
        vizrank.max_attrs = 4
        self.assertEqual(vizrank.state_count(), 15)
        widget.set_data(self.iris_no_class)
        simulate.combobox_activate_index(self.widget.controls.variable_color, 0, 0)
        vizrank.max_attrs = 2
        self.assertEqual(vizrank.state_count(), 6)
        vizrank.max_attrs = 3
        self.assertEqual(vizrank.state_count(), 10)
        vizrank.max_attrs = 4
        self.assertEqual(vizrank.state_count(), 11)
