TST: Ensure that Latitude([lon, lon]) raises#19432
Merged
pllim merged 1 commit intoastropy:mainfrom Mar 16, 2026
Merged
Conversation
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.
|
astrofrog
approved these changes
Mar 16, 2026
Member
|
I think it does not hurt to backport. Thanks! |
meeseeksmachine
pushed a commit
to meeseeksmachine/astropy
that referenced
this pull request
Mar 16, 2026
pllim
added a commit
that referenced
this pull request
Mar 16, 2026
…432-on-v7.2.x Backport PR #19432 on branch v7.2.x (TST: Ensure that Latitude([lon, lon]) raises)
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.
This pull request adds a test to ensure that initializing a latitude from a list of longitudes will fail. This was an issue #11757 in older versions of astropy, but was fixed as a side effect of #17132 in 6.1.5 onwards. This PR just adds a test to ensure we do not regress.
Note to reviewer(s): in principle, it might be nice to rewrite the whole test, separating out different cases, and indeed explicitly test the reverse too. But I don't have the time right now, and thought something is better than nothing. I'd suggest to just merge and leave clean-up for another time, but feel free to push additions.
In a similar vein of avoiding unnecessary work, I felt there is no need for a changelog entry (would have to have been done for 6.1.5), or to backport (since the code is already correct anyway).
Fixes #11757