TST: avoid non-falsifiable matches (match='') in pytest.raises#17857
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.
|
match='') in ˋpytest.raises`
| values = np.array([1.5, 3.4, 3.4, 32, 25]) | ||
| t = models.Tabular1D(points, values) | ||
| with pytest.raises(NotImplementedError, match=r""): | ||
| with pytest.raises(NotImplementedError, match=r"^$"): |
There was a problem hiding this comment.
That would be a question for @WilliamJamieson. The intent from #13919 seems pretty clear that match should always be specified.
match='') in ˋpytest.raises`match='') in pytest.raises
|
Also why didn't the dev infra job catch this? 🤔 Line 88 in ad59869 |
|
because it's not installing scipy and this specific test is skipped without it. |
This comment was marked as resolved.
This comment was marked as resolved.
|
I'm not sure this fits the scope of this environment, but it is clear from this PR that it's a blind spot from our CI so... I guess I'm +0. |
|
Adding it in this PR would prove that your fixes indeed work, so doesn't hurt, especially since we're waiting for William's reply? |
|
not sure how to proceed though. |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as resolved.
This comment was marked as resolved.
|
Thanks! Looks like devinfra installs scipy now and green here. |
pllim
left a comment
There was a problem hiding this comment.
I think this is reasonable patch, so even if we don't hear back from William, probably okay to merge. But maybe give him a few days? 🤷♀️
|
I'm going to merge it before my brain rewires itself to start ignoring this failure. @WilliamJamieson, please feel free to do a post-mortem review if you'd like. Happy to revisit if details need changes. Thanks ! |
…=''`) in `pytest.raises`
…n `pytest.raises` (#17871) Co-authored-by: Clément Robert <cr52@protonmail.com>
Description
Avoid an incoming warning in pytest 8.4 (dev)
Follow up to #13919
reprod
output (truncated)
xref pytest-dev/pytest#13192