Skip to content

Make xpass failure again warning #11467 #11499

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

TanyaAgarwal28
Copy link
Contributor

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

Copy link
Member

@bluetech bluetech left a comment

Choose a reason for hiding this comment

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

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)

@Zac-HD
Copy link
Member

Zac-HD commented Feb 23, 2024

Closing this because @TanyaAgarwal28 hasn't been seen on GitHub for several months. Happy to reopen if it updates!

@Zac-HD Zac-HD closed this Feb 23, 2024
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.

3 participants