Skip to content

Conversation

adorilson
Copy link
Contributor

@adorilson adorilson commented Sep 13, 2025

This PR is a WIP to fix #135272

I'd like reviews and comments before I continue.

Also, I need some help:

  1. I added a load_tests function to include doctests in unittest, and already fixed some ERRORs on tests (8 remaining), the majority were just adding import turtle and instantiating a turtle object. Is it possible to avoid repeating it in every doctest?

  2. I mocked the mainloop function. But maybe it was the right way. How is it?

  3. Any recommendations about how to mock other functions that wait for a user action (num/textinput, ...)?

  4. The optionflags=doctest.ELLIPSIS|doctest.NORMALIZE_WHITESPACE, options seem not to work properly. For instance, (0,0) is saw different of (0, 0) (common on tests with position()). (Or I did understand how these options work.

This PR is related to #111704

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.

Create tests for turtle module
2 participants