'L{LocalWorkerAMP._buildFailure} recreates the C{Failure.frames} from
the C{frames} argument passed to C{AddError}.'

def test_runErrorWithFrames(self):

    results = []
    errorClass = fullyQualifiedName(ValueError)
    d = self.worker.callRemote(managercommands.AddError, testName=self.testName, error='error', errorClass=errorClass.encode('ascii'), frames=['file.py', 'invalid    code', '3'])
    d.addCallback((lambda result: results.append(result['success'])))
    self.pumpTransports()
    self.assertEqual(self.testCase, self.result.errors[0][0])
    self.assertEqual([('file.py', 'invalid    code', 3, [], [])], self.result.errors[0][1].frames)
    self.assertTrue(results)
