pytest-dev / pytest-dev/pytest-rerunfailures

Limit reruns per scope (module, class)

Open
#213 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
477
Forks
107
Avg merge
2d 14h
Merged PRs (30d)
21

Description

I have a test suite where all tests are somewhat flaky. I. e. 1-2 tests out of ~4000 fail almost every time. So I'd like to account for exactly that - rerun up to 2 tests, then fail.

How could the API look like? pytest.mark.flaky on a class/module just marks all tests as flaky - and should likely continue working this way.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the existing pytest.mark.flaky behavior and how rerun limits are currently applied. Define an API for limiting reruns across a module or class, while preserving the existing marker behavior; done means the requested scope can allow up to two rerun tests before failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.