'Run the given C{test}, make sure it fails and return the trimmed
frames.
@param test: The test case to run.
@return: The C{list} of frames trimmed.'

def getErrorFrames(self, test):

    stream = NativeStringIO()
    result = reporter.Reporter(stream)
    test.run(result)
    bads = (result.failures + result.errors)
    self.assertEqual(len(bads), 1)
    self.assertEqual(bads[0][0], test)
    return result._trimFrames(bads[0][1].frames)
