box / box/flaky

Ability to provide a rerun_filter to work with the force-flaky option

Open
#160 1 comment 1 reaction 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.