Skip to content

TST: Ensure that Latitude([lon, lon]) raises#19432

Merged
pllim merged 1 commit intoastropy:mainfrom
mhvk:lon-lat-test-from-list-of-other
Mar 16, 2026
Merged

TST: Ensure that Latitude([lon, lon]) raises#19432
pllim merged 1 commit intoastropy:mainfrom
mhvk:lon-lat-test-from-list-of-other

Conversation

@mhvk
Copy link
Copy Markdown
Contributor

@mhvk mhvk commented Mar 16, 2026

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

  • By checking this box, the PR author has requested that maintainers do NOT use the "Squash and Merge" button. Maintainers should respect this when possible; however, the final decision is at the discretion of the maintainer that merges the PR.

@github-actions
Copy link
Copy Markdown
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.

  • Do the proposed changes actually accomplish desired goals?
  • Do the proposed changes follow the Astropy coding guidelines?
  • Are tests added/updated as required? If so, do they follow the Astropy testing guidelines?
  • Are docs added/updated as required? If so, do they follow the Astropy documentation guidelines?
  • Is rebase and/or squash necessary? If so, please provide the author with appropriate instructions. Also see instructions for rebase and squash.
  • Did the CI pass? If no, are the failures related? If you need to run daily and weekly cron jobs as part of the PR, please apply the "Extra CI" label. Codestyle issues can be fixed by the bot.
  • Is a change log needed? If yes, did the change log check pass? If no, add the "no-changelog-entry-needed" label. If this is a manual backport, use the "skip-changelog-checks" label unless special changelog handling is necessary.
  • Is this a big PR that makes a "What's new?" entry worthwhile and if so, is (1) a "what's new" entry included in this PR and (2) the "whatsnew-needed" label applied?
  • At the time of adding the milestone, if the milestone set requires a backport to release branch(es), apply the appropriate "backport-X.Y.x" label(s) before merge.

@pllim pllim modified the milestones: v8.0.0, v7.2.1 Mar 16, 2026
@pllim pllim added the backport-v7.2.x on-merge: backport to v7.2.x label Mar 16, 2026
@pllim
Copy link
Copy Markdown
Member

pllim commented Mar 16, 2026

I think it does not hurt to backport. Thanks!

@pllim pllim merged commit d999102 into astropy:main Mar 16, 2026
54 of 57 checks passed
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)
@mhvk mhvk deleted the lon-lat-test-from-list-of-other branch March 27, 2026 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

List of Latitudes silently converted to Longitudes

3 participants