-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Reintroduce PytestReturnNotNoneWarning #13495
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
base: main
Are you sure you want to change the base?
Conversation
Do we consider this a bugfix that is OK to enter in the next patch release, or should we wait for |
We should backport as we correct a regression |
Since this warning is meant to be permanent, added proper documentation to the `assert` section in the docs. Fixes pytest-dev#13477
3c8dff2
to
1e1c68d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I think it's a bug fix to be backported
I'm getting the same failure on Testing |
Blocked by #13497, will wait for us to fix that before merging this. |
The related issue is possibly something larger to fix so id prefer we dont block on it |
) | ||
def test_foo(a, b, result): | ||
assert foo(a, b) == result | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should maybe have some blurb on why you might want to return values?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this will only confuse readers. The official pytest documentation should continue to advise against returning anything from test functions. If plugins wish to implement their functionality using return values, they can describe their rationale in their own documentation.
Since this warning is meant to be permanent, added proper documentation to the
assert
section in the docs.Fixes #13477