Make xpass failure again warning #11467#11499
Closed
TanyaAgarwal28 wants to merge 8 commits intopytest-dev:mainfrom
Closed
Make xpass failure again warning #11467#11499TanyaAgarwal28 wants to merge 8 commits intopytest-dev:mainfrom
TanyaAgarwal28 wants to merge 8 commits intopytest-dev:mainfrom
Conversation
for more information, see https://pre-commit.ci
…arwal28/pytest into make_xpass_failure_again
3 tasks
bluetech
requested changes
Jan 27, 2024
Member
bluetech
left a comment
There was a problem hiding this comment.
Thanks for the work on this @TanyaAgarwal28.
I think many test suites don't know or have no use for/of xfail and so I think we shouldn't bother them with the deprecation. Rather we should do something more like the plan outlined by @nicoddemus here: #11467 (comment)
Member
|
Closing this because @TanyaAgarwal28 hasn't been seen on GitHub for several months. Happy to reopen if it updates! |
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.
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