Add a --force-reruns to override rerun count globally#307
Add a --force-reruns to override rerun count globally#307icemac merged 5 commits intopytest-dev:masterfrom
--force-reruns to override rerun count globally#307Conversation
Add a new `--force-reruns` command-line option that can be used to override the rerun count globally, irrespectively of individual test markers. Fixes pytest-dev#306. Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
The test failure seems irrelevant to my changes. The specific case probably needs to be excluded, given that pytest main no longer supports Python 3.9. |
|
@mgorny Thank you for the PR let me prepare a PR that fixed the test issue. |
There was a problem hiding this comment.
Pull Request Overview
This PR adds a new --force-reruns command-line option that allows users to override the rerun count globally, bypassing any individual test markers that specify rerun counts.
- Adds the
--force-rerunsCLI option to force a specific number of reruns for all tests - Modifies the rerun logic to prioritize the global force setting over individual test markers
- Includes comprehensive documentation and test coverage for the new feature
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/pytest_rerunfailures.py | Adds CLI option and modifies rerun count logic to check force setting first |
| tests/test_pytest_rerunfailures.py | Adds test case to verify force reruns behavior with and without markers |
| docs/cli.rst | Documents the new --force-reruns option with usage examples |
| README.rst | Adds user-facing documentation for the force rerun feature |
| CHANGES.rst | Records the new feature in the changelog |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
@mgorny The GHA failure is now fixed upstream. Could you please have a look into the Copilot comments? |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
I'm not a native speaker, so I guess the statistical data set knows better. |
|
Uh, looks like this time it's hitting a runner issue. |
icemac
left a comment
There was a problem hiding this comment.
LGTM with some suggestions.
Co-authored-by: Michael Howitz <m.howitz@minddistrict.com>
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Add a new
--force-rerunscommand-line option that can be used to override the rerun count globally, irrespectively of individual test markers.Fixes #306.