def test_success(self):
        """
        A test run is still successful even if there are expected failures.
        """
        self.result.addExpectedFailure(self.test, Failure(Exception()),
                                       makeTodo('todo!'))
        self.assertEqual(True, self.result.wasSuccessful())

        A test run is still successful even if there are expected failures.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/trial/test/test_reporter.py