flaky
flaky copied to clipboard
Ability to provide a rerun_filter to work with the force-flaky option
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:
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)
@mentaal this solution is not working when I tried. Is this still working for you?