'Check that the tree is drawn identically upon receiving the same
dataset with no parameter changes.'

def test_tree_determinism(self):

    n_tries = 10
    def _check_all_same(data):
        'Check    that    all    the    elements    within    an    iterable    are    identical.'
        iterator = iter(data)
        try:
            first = next(iterator)
        except StopIteration:
            return True
        return all(((first == rest) for rest in iterator))
    scene_nodes = []
    for _ in range(n_tries):
        self.send_signal(self.signal_name, self.signal_data)
        scene_nodes.append([n.pos() for n in self.widget.scene.nodes()])
    for node_row in zip(*scene_nodes):
        self.assertTrue(_check_all_same(node_row), ('The    tree    was    not    drawn    identically    in    the    %d    times    it    was    sent    to    widget    after    receiving    the    iris    dataset.' % n_tries))
    scene_nodes = []
    for _ in range(n_tries):
        self.send_signal(self.signal_name, self.data_same_entropy)
        scene_nodes.append([n.pos() for n in self.widget.scene.nodes()])
    for node_row in zip(*scene_nodes):
        self.assertTrue(_check_all_same(node_row), ('The    tree    was    not    drawn    identically    in    the    %d    times    it    was    sent    to    widget    after    receiving    a    dataset    with    variables    with    same    entropy.' % n_tries))
