def test_addExpectedFailure(self):
        """
        L{WorkerReporter.addExpectedFailure} sends a
        L{managercommands.AddExpectedFailure} command.
        protocol.
        """
        self.workerReporter.addExpectedFailure(
            self.test, Failure(RuntimeError('error')), Todo('todo'))
        self.assertEqual(self.fakeAMProtocol.lastCall,
                         managercommands.AddExpectedFailure)

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