str0zzapreti / pytest-retry

A simple plugin for retrying flaky tests in CI environments
MIT License
27 stars 6 forks source link

hotfixed retry failure count #6

Closed str0zzapreti closed 1 year ago

str0zzapreti commented 1 year ago

Turns out using attributes for the report to track retries doesn't work with Pytest's internal counter. The outcome has to be overwritten even though it's got a Literal typing for passed, failed, and skipped. The other official retry plugins do this as well. Seems rather strange, but there it is.

Also prevented a possible durations index error if another exception occurred during the pytest_report_teststatus stage. (e.g. if using a custom teststatus hook in conjunction with this plugin).