Skip to content

Add some doctest cleanups for turtle and configparser #125288

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 10, 2024

Conversation

AlexWaygood
Copy link
Member

@AlexWaygood AlexWaygood commented Oct 10, 2024

These doctests write files to your file system, leaving your working tree in a dirty state


📚 Documentation preview 📚: https://cpython-previews--125288.org.readthedocs.build/

@AlexWaygood
Copy link
Member Author

I tried in vain to find a way to get the turtle window to close after the turtle doctests specifically have finished. (It currently does not disappear until all doctests for all modules have been completed.) Sadly I know very little about turtle!

@AlexWaygood AlexWaygood added needs backport to 3.12 only security fixes needs backport to 3.13 bugs and security fixes labels Oct 10, 2024
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
@AlexWaygood AlexWaygood enabled auto-merge (squash) October 10, 2024 23:36
@AlexWaygood AlexWaygood merged commit a726ce7 into python:main Oct 10, 2024
23 checks passed
@AlexWaygood AlexWaygood deleted the turtle-cleanup branch October 10, 2024 23:53
@miss-islington-app
Copy link

Thanks @AlexWaygood for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 10, 2024
…25288)

(cherry picked from commit a726ce7)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 10, 2024
…25288)

(cherry picked from commit a726ce7)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
@bedevere-app
Copy link

bedevere-app bot commented Oct 10, 2024

GH-125290 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Oct 10, 2024
@bedevere-app
Copy link

bedevere-app bot commented Oct 10, 2024

GH-125291 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 only security fixes label Oct 10, 2024
@zware
Copy link
Member

zware commented Oct 11, 2024

I tried in vain to find a way to get the turtle window to close after the turtle doctests specifically have finished.

Not yet tested, but I think turtle.bye() might do it.

@AlexWaygood
Copy link
Member Author

Not yet tested, but I think turtle.bye() might do it.

I tried! Without success...

@zware
Copy link
Member

zware commented Oct 11, 2024

Interesting! I have now had a chance to try it locally, and adding bye() (not turtle.bye(), but bye from the from turtle import *) to your added testcleanup section was enough to remove the window at the end of the turtle tests for me. I'll open a PR with what worked here for your perusal (and leave it as a suggestion on the backports that need to adjust for the new feature anyway).

@AA-Turner
Copy link
Member

@zware I got #125293 working, but it might be too complicated if just bye() works (I had several doctest failures due to turtle.Terminator, hence trying the Screen().bye() approach.)

@bedevere-app
Copy link

bedevere-app bot commented Oct 11, 2024

GH-125290 is a backport of this pull request to the 3.13 branch.

@bedevere-app
Copy link

bedevere-app bot commented Oct 11, 2024

GH-125291 is a backport of this pull request to the 3.12 branch.

AlexWaygood added a commit that referenced this pull request Oct 11, 2024
)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
AlexWaygood added a commit that referenced this pull request Oct 11, 2024
)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip issue skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants