def test_addFailure(self):
        """
        L{WorkerReporter.addFailure} sends a L{managercommands.AddFailure}
        command.
        """
        self.workerReporter.addFailure(self.test,
                                       Failure(RuntimeError('fail')))
        self.assertEqual(self.fakeAMProtocol.lastCall,
                         managercommands.AddFailure)

        L{WorkerReporter.addFailure} sends a L{managercommands.AddFailure}
        command.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/trial/_dist/test/test_workerreporter.py