def test_expectedFailures(self):
        """
        Ensure that expected failures are handled properly.
        """
        self.suite(self.reporter)
        expectedReasons = ['todo1', 'todo2']
        reasonsGiven = [ r.reason
                         for t, e, r in self.reporter.expectedFailures ]
        self.assertEqual(expectedReasons, reasonsGiven)

        Ensure that expected failures are handled properly.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/trial/test/test_tests.py