-
Notifications
You must be signed in to change notification settings - Fork 47
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
Returning fig is incompatible with pytest 7.2 (when test uses marker but pytest-mpl not installed) #183
Comments
Hey, pytest maintainer here. Here is the related code in pytest: I see pytest-mpl uses a hookwrapper over |
I don't think there is an issue here. If The issue in There are two options:
My preference is for option 1. |
My vote is also 1 since I don't find these tests very useful without this plugin. |
The only thing that those tests do is exercise some of the |
Sure, but CircleCI one is the true purpose of those tests. I think "just see if it crash or not" is partly covered by doctest anyway. Though if you are relying on the job without pytest-mpl to calculate coverage... 💭 |
Then again, (2) isn't a foolproof solution. Anyone running these tests with remote data locally but didn't install pytest-mpl would have the same problem. |
I would be fine with 1 |
Alright, here is a weird
I have to create a completely new environment in order for the |
FWIW, I cannot reproduce this problem but I use |
As already noted, this issue only occurs when pytest-mpl is not installed. I've opened a PR to close this issue. It adds the following to the docs:
|
As @WilliamJamieson discovered in astropy/astropy#13892 , we now see
PytestReturnNotNoneWarning
with pytest 7.2 that will eventually become an exception in future releases. If there is no way to opt out (asking at pytest-dev/pytest#10427), can this plugin still work withoutreturn fig
?The text was updated successfully, but these errors were encountered: