Skip to content

Fix handling of --rerun-except arguments#226

Merged
icemac merged 3 commits intopytest-dev:masterfrom
cfulljames:master
Jul 5, 2023
Merged

Fix handling of --rerun-except arguments#226
icemac merged 3 commits intopytest-dev:masterfrom
cfulljames:master

Conversation

@cfulljames
Copy link
Copy Markdown
Contributor

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

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
Copy link
Copy Markdown
Contributor

@icemac icemac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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``.
Copy link
Copy Markdown
Contributor

@icemac icemac Jul 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Michael Howitz and others added 2 commits July 3, 2023 08:29
Add more information about the fix for exception filtering for pytest-dev#225.
Copy link
Copy Markdown
Contributor

@icemac icemac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for fixing this issue!

@icemac icemac merged commit 6970e14 into pytest-dev:master Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Multiple --rerun-except arguments are ANDed instead of ORed

2 participants