Skip to content

Make class-scoped cosmology test fixtures @classmethod for pytest 9.1 - #19748

Merged
pllim merged 3 commits into
astropy:mainfrom
astrofrog:fix-pytest-91-class-fixtures
May 15, 2026
Merged

pllim merged 3 commits into
astropy:mainfrom
astrofrog:fix-pytest-91-class-fixtures

Conversation

@astrofrog

@astrofrog astrofrog commented May 15, 2026 •

Copy link
Copy Markdown
Member

This should hopefully fix the pytest dev failures in the cron job?

Fix #19742

  • 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.

@astrofrog
astrofrog requested a review from nstarman May 15, 2026 12:54
@astrofrog
astrofrog requested a review from a team as a code owner May 15, 2026 12:54
@astrofrog astrofrog added testing cosmology Extra CI Run cron CI as part of PR backport-v7.2.x on-merge: backport to v7.2.x backport-v8.0.x on-merge: backport to v8.0.x labels May 15, 2026
@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.

@astrofrog astrofrog added this to the v7.2.1 milestone May 15, 2026
@astrofrog
astrofrog requested a review from pllim May 15, 2026 13:25
Comment thread docs/changes/19748.other.rst Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We usually don't include change log for test only changes but I guess in this case, it doesn't hurt.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But should we move this to under cosmology section?

@pllim pllim left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much for tackling this. I am glad it turns out to be simpler than refactoring all the inheritance. devinfra is green here, so I am approving. Just a small question about change log.

@github-project-automation github-project-automation Bot moved this from Triage to Reviewer approved in Cosmology, the Expansion May 15, 2026
@pllim

pllim commented May 15, 2026

Copy link
Copy Markdown
Member

Timeouts in devdeps are unrelated

@nstarman nstarman left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@astrofrog

Copy link
Copy Markdown
Member Author

Can someone remove the changelog commit? I'm not at the computer for a few hours, I think we don't need a changelog entry here as @pllim pointed out. If no one gets a change I'll do it later.

@pllim

pllim commented May 15, 2026

Copy link
Copy Markdown
Member

I removed it the lazy way. There is no need to rerun CI. I will squash and merge. Thanks!

@pllim
pllim merged commit fba7f90 into astropy:main May 15, 2026
1 check passed
@github-project-automation github-project-automation Bot moved this from Reviewer approved to Done in Cosmology, the Expansion May 15, 2026
pllim pushed a commit that referenced this pull request May 15, 2026
pllim added a commit that referenced this pull request May 15, 2026
…748-on-v7.2.x

Backport PR #19748 on branch v7.2.x (Make class-scoped cosmology test fixtures @classmethod for pytest 9.1)
pllim pushed a commit that referenced this pull request May 15, 2026
pllim added a commit that referenced this pull request May 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-v7.2.x on-merge: backport to v7.2.x backport-v8.0.x on-merge: backport to v8.0.x cosmology Extra CI Run cron CI as part of PR no-changelog-entry-needed testing

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

TST: cosmology test classes not compatible with pytest 10

3 participants