Fix handling of --rerun-except arguments#226
Merged
icemac merged 3 commits intopytest-dev:masterfrom Jul 5, 2023
Merged
Conversation
Previously, a failure had to match all --rerun-except arguments to prevent a test from rerunning. Now it will not rerun if one or more are matched. Additionally, if --only-rerun and --rerun-except are used together, a failure must match at least one --only-rerun pattern and none of the --rerun-except patterns for the test to be rerun. Previously a test would be rerun if it matched neither --only-rerun nor --rerun-except. Fixes pytest-dev#225
icemac
requested changes
Jul 3, 2023
Contributor
icemac
left a comment
There was a problem hiding this comment.
I like the fix, I'd just request a bit more documentation in the change log as this is what users of the package might read.
CHANGES.rst
Outdated
| +++++++++ | ||
|
|
||
| -- Fix handling of ``--rerun-except`` and ``--only-rerun`` when used together, | ||
| and multiple instances of ``--rerun-except``. |
Contributor
There was a problem hiding this comment.
This bugfix changes the behaviour, so could you please write about the behaviour before and after the fix here as you did in the PR description?
A link to #225 would also be nice as it describes the problem in more detail.
Add more information about the fix for exception filtering for pytest-dev#225.
icemac
approved these changes
Jul 5, 2023
Contributor
icemac
left a comment
There was a problem hiding this comment.
Thank you for fixing this issue!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously, a failure had to match all --rerun-except arguments to prevent a test from rerunning. Now it will not rerun if one or more are matched.
Additionally, if --only-rerun and --rerun-except are used together, a failure must match at least one --only-rerun pattern and none of the --rerun-except patterns for the test to be rerun. Previously a test would be rerun if it matched neither --only-rerun nor --rerun-except.
Fixes #225