Ability to provide a rerun_filter to work with the force-flaky option
Open
- Dominant language
- Python
- Stars
- 398
- Forks
- 57
- PR merge metrics
- No merged PRs in 30d
Description
In the case of when the user is using `force-flaky`, it would be useful to be able to provide a filter function as well that can be used globally.
I was able to do it with a bit of a hack for the moment:
```python
def pytest_configure(config):
flaky_inst = config.pluginmanager.getplugin("flaky").PLUGIN
flaky_inst._make_test_flaky = partial(flaky_inst._make_test_flaky,
rerun_filter=should_rerun)
```
Contributor guide
Assessment
This issue has not been assessed yet.