'Ensure that next_element and previous_element are properly
set for all descendants of the given element.'

def assertConnectedness(self, element):

    earlier = None
    for e in element.descendants:
        if earlier:
            self.assertEqual(e, earlier.next_element)
            self.assertEqual(earlier, e.previous_element)
        earlier = e
