Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip remaining repeated tests on failure #20

Open
dirk-thomas opened this issue Jun 5, 2018 · 2 comments
Open

Skip remaining repeated tests on failure #20

dirk-thomas opened this issue Jun 5, 2018 · 2 comments

Comments

@dirk-thomas
Copy link

The rerunfailures plugin can be used to detect flaky tests and ignore them by trying to rerun previous failed tests. If a repeated run succeeds that is then considered "good enough".

I am interested in the "opposite" feature and thought it might fit into this plugin. To ensure that a test is not flaky I want to run it multiple times. This plugin already supports that use case. In the case where a test fails I don't want the remaining invocations to happen (in order to save time). Using the pytest option -x is not feasible for that case since I am still interested in the result of all different tests and don't want to abort testing all together.

Would an additional option like --stop-repeating-same-test-if-it-failed-once (just a name to describe the semantic) fit into this plugin? If yes, with a little pointer I might be able to provide a pull request if that is helpful.

@AdamWRichardson
Copy link

Is there any update on this? Would also be very interested in such a feature!

@Martiix
Copy link

Martiix commented Mar 7, 2022

I am also interested in this, except I want to set a limit to how many times an individual test can fail before it stops running this test and continues with the rest. Pytest has the --maxfail attribute, but I would like to combine it with python-repeat, therefore needing it on an individual test. I'm looking for something like
@pytest.mark.repeat(100)
@pytest.mark.maxfail(10)
def test():
Any updates?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants