def addExpectedFailure(self, testName, error, todo):
        """
        Add an expected failure to the reporter.
        """
        _todo = Todo(todo)
        self._result.addExpectedFailure(self._testCase, error, _todo)
        return {'success': True}

        Add an expected failure to the reporter.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/trial/_dist/worker.py