'If an iterator of steps is passed to ``with_retry``, it is used to
determine the number of retries and the duration of the sleeps between
retries.'

def test_steps(self):

    s = timedelta(seconds=1)
    sleeps = []
    wrapper = with_retry(partial(self.always_failing, count()), sleep=sleeps.append, steps=[(s * 1), (s * 2), (s * 3)])
    self.assertRaises(CustomException, wrapper)
    self.expectThat(sleeps, Equals([1, 2, 3]))
