-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Is there a way to opt out of PytestReturnNotNoneWarning ? #10427
Comments
@pllim you can configure But this brings to attention that |
@nicoddemus , ignoring warning won't solve the problem when you turn it into exception though. |
Nope it won't, that's why I said "pytest-mpl probably needs to be updated". |
Okay. I also asked at matplotlib/pytest-mpl#183 🤞 |
Also see #10421 |
As of pytest 7.2.0 , any test function that returns something not a
None
now gets aPytestReturnNotNoneWarning
. Looking at its memo in https://github.com/pytest-dev/pytest/blob/main/doc/en/deprecations.rst , I do not see a way to tellpytest
, "It's okay, this return is intentional, just let it return stuff and not emit the warning."How do I opt out of this warning?
What's the problem this feature will solve?
This will let me keep using https://github.com/matplotlib/pytest-mpl plugin because it requires returning the Matplotlib figure object for image comparison.
Describe the solution you'd like
Let me opt out.
Alternative Solutions
Tell https://github.com/matplotlib/pytest-mpl devs how to rework their plugin to not return stuff.
Additional context
astropy/astropy#13892 (we do not want to pin maxversion of pytest if we can help it)
The text was updated successfully, but these errors were encountered: