Conversation
|
Thank you for your contribution to Astropy! 🌌 This checklist is meant to remind the package maintainers who will review this pull request of some common things to look for.
|
|
👋 Thank you for your draft pull request! Do you know that you can use |
This comment was marked as resolved.
This comment was marked as resolved.
|
pre-commit.ci autofix |
[pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci
as requested by nstarman
512d14b to
fabbc49
Compare
|
pre-commit.ci autofix |
|
Linkcheck failure is unrelated. |
Do not use raw string for regex when we do not have to.
|
If I don't hear back from @saimn or @astrofrog by 2023-08-17, I am just going to merge this so I can move on with my life. |
This comment was marked as resolved.
This comment was marked as resolved.
|
Ugh, maybe we'll just pin |
|
|
||
| pytest.raises( | ||
| fits.VerifyError, hdul.writeto, filename, output_verify="exception" | ||
| ) |
There was a problem hiding this comment.
@pllim - Hmm seems this one got lost while updating the other lines ?
There was a problem hiding this comment.
This line is missing a with. Not sure what it is supposed to do.
There was a problem hiding this comment.
it can be used as a function :
When using [pytest.raises()](https://docs.pytest.org/en/latest/reference/reference.html#pytest.raises) as a function, you can use: pytest.raises(Exc, func, match="passed on").match("my pattern").)
There was a problem hiding this comment.
(which I agree is not usual and obvious ;))
There was a problem hiding this comment.
Oh, oops. Do you want to add it back? If not, I'll get to it when I have time. Sorry!
There was a problem hiding this comment.
Not sure if it's tested elsewhere, so I will try to keep that on my list. But no problem, it's easy to get confused by this.
Description
This pull request is to address pytest 8 compatibility, which also allows us to fix some poor test warnings handling. Also see pytest-dev/pytest#10937 (comment)
Fixes #15015
After merge: Open follow-up issue to just require
pytest>=8in the future so we can clean up the if-else logic here.