def test_accumulation(self):
        """
        L{reporter.Reporter} accumulates the expected failures that it
        is notified of.
        """
        self.result.addExpectedFailure(self.test, Failure(Exception()),
                                       makeTodo('todo!'))
        self.assertEqual(len(self._getTodos(self.result)), 1)

        L{reporter.Reporter} accumulates the expected failures that it
        is notified of.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/trial/test/test_reporter.py