'If the C{stopOnFirstError} option is passed to C{runSequentially}, then
no further callables are called after the first exception is raised.'

def test_stopOnFirstError(self):

    d = util._runSequentially([(lambda : self.fail('foo')), (lambda : 'bar')], stopOnFirstError=True)
    def check(results):
        [(flag1, fail)] = results
        fail.trap(self.failureException)
        self.assertEqual(flag1, defer.FAILURE)
        self.assertEqual(fail.getErrorMessage(), 'foo')
    self.assertDeferredResult(d, check)
