Skip to content

Backport PR #17751 on branch main (Backport PR #17747 on branch v7.0.x (Ensure doctests do not have side effects)) - #17757

Merged
pllim merged 1 commit into
astropy:mainfrom
meeseeksmachine:auto-backport-of-pr-17751-on-main
Feb 10, 2025
Merged

pllim merged 1 commit into
astropy:mainfrom
meeseeksmachine:auto-backport-of-pr-17751-on-main

Conversation

@meeseeksmachine

Copy link
Copy Markdown

Backport PR #17751: Backport PR #17747 on branch v7.0.x (Ensure doctests do not have side effects)

… (Ensure doctests do not have side effects)
@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 commented Feb 10, 2025

Copy link
Copy Markdown
Member

Haha, it works! 😆

@pllim
pllim requested a review from mhvk February 10, 2025 18:43

@mhvk mhvk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't quite like that I don't understand why this was needed on 7.0.x, but the double test seems to pass on main.

But I now checked and on current main, I get a failure if I do

pytest --keep-duplicates docs/table/mixin_columns.rst docs/table/mixin_columns.rst

So, in the usual duplicate run, perhaps something gets reset in between that avoids the failure, but that still suggests it is good to add the test cleanup here.

@pllim

pllim commented Feb 10, 2025

Copy link
Copy Markdown
Member

something gets reset in between that avoids the failure

I still don't grok why it is reset sometimes... but glad you able to patch it. Thank you very much!

@pllim
pllim merged commit 71d649d into astropy:main Feb 10, 2025
@neutrinoceros

Copy link
Copy Markdown
Contributor

Have we considered the possibility that running double tests with parallelization introduces some non-determinism to the build ?

@pllim

pllim commented Feb 11, 2025

Copy link
Copy Markdown
Member

It is very possible. At the smallest level, even if we clean up with teardown_module, there might be accidental assumption that a test always run after another test in that file, which is not the case anymore. 🤪

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.

4 participants