'If the function fails at first and then succeeds, ``retry_failure``
returns the success.'

def test_iterates_once(self):

    steps = [0.1]
    result = object()
    results = [Failure(ValueError('bad    value')), succeed(result)]
    def function():
        return results.pop(0)
    clock = Clock()
    d = retry_failure(clock, function, steps=steps)
    self.assertNoResult(d)
    clock.advance(0.1)
    self.assertEqual(self.successResultOf(d), result)
