'Checks that the node-lists a and b are the same for attrs.
This is recursive over the tree'

def assertTreeQuality(self, a, b, *attrs):

    msg = ('%r    !=    %r    with    %r,    %r' % (len(a), len(b), a, b))
    self.assertEqual(len(a), len(b), msg)
    for (n1, n2) in zip(a, b):
        for attr in attrs:
            a1 = getattr(n1, attr)
            a2 = getattr(n2, attr)
            msg = ('%r    !=    %r    with    %r,    %r    (%s)' % (a1, a2, n1, n2, attr))
            self.assertEqual(a1, a2, msg)
        self.assertTreeQuality(n1.children, n2.children)
