Make xpass failure again warning #11467 #11499
Closed
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.
Problem:
Some years ago, a change was made that caused xpass not to be considered a failure. However, there have been multiple cases where it was missed that a test was fixed, and this is not an acceptable default behavior.
Solution:
This PR aims to address the issue by modifying the behavior of xpass in the following way: In order to ensure backward compatibility we cannot go straight from non-strict to strict instead we have to start by warning if strict was not set to true or false. The warning should indicate that a future major release of pytest will change the default from False to True and recommend to use strict=True as default and a plugin for actually flaky tests.
Checklist:
Include documentation for the proposed change.
Include new tests or update existing tests, where applicable.
Allow maintainers to push and squash when merging my commits.
This change closes issue #11467.
Changelog: Created a new changelog file named 11467.feature.rst and added the entry for this change.
Author: Tanya Agarwal