def testBasicFail(self): # This'll work on the 15th attempt, which means the test will throw here dmy = DummyClass(15) # use miliseconds so the tests don't take forever... rty = Basic(unit=1 / 1000) self.assertRaises(RetryFailException, rty.run, dmy.function)
def testBasicSuccesss(self): # This'll work on the 5th attempt dmy = DummyClass(5) # use miliseconds so the tests don't take forever... rty = Basic(unit=1 / 1000) rty.run(dmy.function)