'Quickly checks if the list is sane.'

def CheckList(self, l):

    if (not l.head):
        self.assertFalse(bool(l.tail))
    self.assertFalse(bool(l.head.prev))
    self.assertFalse(bool(l.tail.next))
    p = self.head
    p1 = self.head.next
    while p1:
        self.assertEqual(p1.prev, p)
        p = p1
        p1 = p1.next
    self.assertEqual(p, self.tail)
