

def test_raises_timeout_error_if_timedout(self, sleep_mock):
    retry = retrying.Retry(max_time=100, wait_exponential=True, reraise_original_exception=False)

    @retry
    def func():
        raise RuntimeError()
    self.assertRaises(retrying.TimeoutExceeded, func)
    self.assertTrue((retry.total_time >= retry.max_time))
    self.assertTrue(sleep_mock.called)

dataset/ETHPy150Open MirantisWorkloadMobility/CloudFerry/tests/lib/utils/test_retrying.py RetryTestCase.test_raises_timeout_error_if_timedout/original