Closed
Description
As of pytest 7.2.0 , any test function that returns something not a None
now gets a PytestReturnNotNoneWarning
. Looking at its memo in https://github.com/pytest-dev/pytest/blob/main/doc/en/deprecations.rst , I do not see a way to tell pytest
, "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)
Metadata
Metadata
Assignees
Labels
No labels