'Override pdb.post_mortem so we can make sure it\'s called.'

def setUp(self):

    post_mortem = pdb.post_mortem
    origInit = failure.Failure.__init__
    def restore():
        pdb.post_mortem = post_mortem
        failure.Failure.__init__ = origInit
    self.addCleanup(restore)
    self.result = []
    pdb.post_mortem = self.result.append
    failure.startDebugMode()
