def test_singleAsynchronousFailure(self):
        """
        When given a callable that returns a failing Deferred, include the
        failure the results list, tagged with a FAILURE flag.
        """
        d = util._runSequentially([lambda: defer.fail(ValueError('foo'))])
        def check(results):
            [(flag, fail)] = results
            fail.trap(ValueError)
            self.assertEqual(fail.getErrorMessage(), 'foo')
            self.assertEqual(flag, defer.FAILURE)
        self.assertDeferredResult(d, check)

        When given a callable that returns a failing Deferred, include the
        failure the results list, tagged with a FAILURE flag.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/trial/test/test_util.py