str0zzapreti / pytest-retry

A simple plugin for retrying flaky tests in CI environments
MIT License
29 stars 6 forks source link

A context manager for wrapping functions with retry functionality #10

Closed GektorPrime closed 1 year ago

GektorPrime commented 1 year ago

Please add a context manager for wrapping functions with retry functionality similarly as implemented here: https://pypi.org/project/redo/

str0zzapreti commented 1 year ago

Closing this issue because this functionality is out of the scope of pytest-retry, which deals specifically with retrying Pytest test functions. If you need a context manager for retrying generic functions, I would suggest using another library or defining one yourself.