pytest-github-actions-annotate-failures icon indicating copy to clipboard operation
pytest-github-actions-annotate-failures copied to clipboard

Support pytest-rerunfailures?

Open billyvg opened this issue 4 years ago • 3 comments

We currently use pytest-rerunfailures to re-run our flakey tests. These failures that get re-run and eventually succeed will still get annotated in GHA which causes some confusion for us. Would you be willing to add support for the rerun plugin?

I'm able to get it working using this:

    try:
        # If we have the pytest_rerunfailures plugin,
        # and there are still retries to be run,
        # then do not return the error
        import pytest_rerunfailures
        if item.execution_count <= pytest_rerunfailures.get_reruns_count(item):
            return
    except ImportError:
        pass

billyvg avatar Jul 30 '21 19:07 billyvg

:+1: (I didn't know pytest-rerunfailures plugin.)

utgwkk avatar Jul 31 '21 03:07 utgwkk

I've just released version 0.1.4 containing #40 (fix of this issue). Thank you for your contribution! @billyvg

utgwkk avatar Oct 24 '21 14:10 utgwkk

Reopened due to #42

utgwkk avatar Oct 25 '21 00:10 utgwkk