channable / opnieuw

One weird trick to make your code more reliable
https://tech.channable.com/posts/2020-02-05-opnieuw.html
BSD 3-Clause "New" or "Revised" License
289 stars 11 forks source link

Add switch to disable waiting for tests #7

Closed jochemb closed 4 years ago

jochemb commented 4 years ago

When testing code that is using opnieuw you don't want to sleep, but do want to retry. This changes adds the following syntax for tests:

from opnieuw.test_util import retry_immediately

def some_test():
    with retry_immediately():
        # perform some tests that code exception handling via retries