Provide example of @pytest.fixure that is flaky
I tried to do this
@pytest.fixture
@pytest.mark.flaky
def the_server(
But it didn't seem to work as I expected. Is that the right way of doing it as I don't see it in the readme
Perhaps something on this page https://pytest-rerunfailures.readthedocs.io/latest/mark.html
I don't think marks work on fixtures.
Then the statement in the README should say that as a rule then right now it says
This plugin may not be used with class, module, and package level fixtures.
So I presume function fixtures should be fine.
I don't think that this makes any sense because every single project using pytest would have to document this. Applying markers is a feature of pytest. There's no reason for each plugin to explain how pytest works.
https://stackoverflow.com/a/58493116/595220
I mean if the rerunfailures is not supposed to work on fixtures it should just say
This plugin may not be used with fixtures.
Rather than qualifying it with class, module, and package. Assuming that it isn't supported.
You can apply marks where pytest lets you 🤷♂️
That sentence is referring to using the plugin with (tests that use) fixtures, not on fixtures. It's outdated however, see #291.