TST: Fix test_ignore_sigint for pytest 8#15817
Closed
pllim wants to merge 2 commits intoastropy:mainfrom
Closed
Conversation
because maybe you cannot use pytest.warns inside a function sent to pytest.raises anymore in some cases; not sure.
Contributor
|
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.
|
Contributor
|
👋 Thank you for your draft pull request! Do you know that you can use |
Member
Author
|
pre-commit.ci autofix |
for more information, see https://pre-commit.ci
Member
Author
|
Hmm @nstarman or @eerovaher or @WilliamJamieson , do you know why linkcheck job is failing with typing related warnings? |
Member
Author
|
Wow, this is crazy. If I fix it for the predeps job, other jobs fail but not all of them. |
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Maybe because maybe you cannot use pytest.warns inside a function sent to pytest.raises anymore in some cases; not sure. After merge, devdeps that was failing in #15809 no longer fails (though it still picks up pytest 8.0rc) but predeps still fails. This is all very confusing.
Locally, I had to install
[all]and[test_all], pytest 8.0rc, and runpytest astropy/io/fits/tests/ --remote-datafor the error to show up. Runningpytest astropy/io/fits/tests/test_util.py -k test_ignore_sigint --remote-datadoes not trigger the error.I guess this is what happens when we play with fire that is called
os.kill.This is a direct follow-up of #15809 to fix #15807 .