pytest icon indicating copy to clipboard operation
pytest copied to clipboard

Make xpass failure again warning #11467

Open TanyaAgarwal28 opened this issue 2 years ago • 0 comments

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 https://github.com/pytest-dev/pytest/issues/11467.

Changelog: Created a new changelog file named 11467.feature.rst and added the entry for this change.

Author: Tanya Agarwal

TanyaAgarwal28 avatar Oct 12 '23 09:10 TanyaAgarwal28