Beispiel #1
0
 def test_succeeds_after_retries(self):
     x = RaisesNTypeErrors(5)
     x = retry(5, TypeError, 0.01, 'ERROR')(x)
     x()
Beispiel #2
0
 def test_succeeds_after_retries(self):
     x = RaisesNTypeErrors(5)
     x = retry(5, TypeError, 0.01, 'ERROR')(x)
     x()
Beispiel #3
0
 def test_fail_after_n_tries(self):
     x = RaisesNTypeErrors(5)
     x = retry(4, TypeError, 0.01, 'ERROR')(x)
     with self.assertRaises(TypeError):
         x()
Beispiel #4
0
 def test_fail_after_n_tries(self):
     x = RaisesNTypeErrors(5)
     x = retry(4, TypeError, 0.01, 'ERROR')(x)
     with self.assertRaises(TypeError):
         x()