-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Allow documentation tests in FITS verification page #11137
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
Conversation
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.
Thanks for your work on this @cmarmo, very useful since obviously some examples were out of date. I'm not sure how to best handle the warnings/exception issue (some ideas in the comments). It would be better if the users can see the warnings as they would get them by default.
|
Re: Warnings -- If you want them to show but don't want doctest to fail, use https://github.com/astropy/pytest-doctestplus#ignoring-warnings
p.s. If you do this, don't have to write out the warnings in expected outputs. |
|
@pllim - |
|
Yes, correct that |
|
I've tried to clean a bit, but now to avoid |
|
@cmarmo : I've hijacked a bit your PR, sorry, trying to find a better solution for warnings. To keep the docs clear and focused on the initial topic, it would be better if we could avoid all the warnings related code. So currently I have factored the catching and printing in a |
@saimn no problem, this kind of refactoring was above my python skills... always happy to learn... :)
Do you mind if I add a comment in the testsetup block, to document that the function is accessory to the warning management in the example? and that it could one day be replaced by a |
@cmarmo - I managed to make a PR on doctestplus (scientific-python/pytest-doctestplus#136), so if you don't mind waiting a bit we can update the PR once it's merged and released ? (hopefully soon!) |
Arrgggh, I should have waited for the release too... :( |
|
I released the new version of pytest-doctestplus, and closed/reopened the PR to trigger the actions builds. |
saimn
left a comment
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.
Seems all good now with the new doctestplus version. Thanks @cmarmo !
|
Thank you @saimn . |
Description
This pull request removes the
.. doctest-skipdirective from the FITS verification page. I could not find a better way to manage warnings than inserting a doctest.IGNORE_EXCEPTION_DETAIL.Fixes #6686.