cpython icon indicating copy to clipboard operation
cpython copied to clipboard

Create tests for turtle module

Open adorilson opened this issue 7 months ago • 4 comments

turtle module has too few tests.

These are the module's public classes to review if there are test and/or implement them:

  • [ ] RawTurtle
  • [ ] ScrolledCanvas
  • [ ] TNavigator
  • [ ] TPen
  • [ ] Tbuffer
  • [ ] Terminator
  • [ ] Turtle
  • [ ] TurtleGraphicsError
  • [ ] TurtleScreen
  • [ ] TurtleScreenBase
  • [ ] Vec2D

Some random notes:

  1. For those going to work on teleport, see https://github.com/python/cpython/pull/107807#pullrequestreview-1584010411

Here, go the module's functions:

  • [ ] Screen
  • [ ] config_dict
  • [ ] demo1
  • [ ] demo2
  • [ ] getmethpartlist (WIP: https://github.com/python/cpython/pull/135533)
  • [ ] read_docstrings
  • [ ] readconfig
  • [ ] switchpen
  • [ ] write_docstringdict

adorilson avatar Jun 08 '25 17:06 adorilson

Are you willing to work on this one? if so, I can assign you the issue

picnixz avatar Jun 13 '25 17:06 picnixz

Hi @picnixz @adorilson Can I help you with this?

mingdaoy avatar Jun 15 '25 02:06 mingdaoy

Your help is welcome! Let's first test the RawTurtle class.

picnixz avatar Jun 15 '25 08:06 picnixz

Are you willing to work on this one? if so, I can assign you the issue

Yes, I do. However, I prefer not to be assigned, as I'm unsure when I might be available to do this.

adorilson avatar Jun 28 '25 21:06 adorilson

I realized that python -m test doesn't run doctest against the turtle module. Is there some reason for that? Or was it just forgotten?

adorilson avatar Sep 11 '25 22:09 adorilson

Doesn't it need -ugui resource? if this still doesn't run the doctests, then maybe it's a more general issue where we don't run doctests in the code at all.

picnixz avatar Sep 11 '25 22:09 picnixz

Doesn't it need -ugui resource?

Doens't work.

if this still doesn't run the doctests, then maybe it's a more general issue where we don't run doctests in the code at all.

I found it working for the enum module, for instance.

adorilson avatar Sep 12 '25 00:09 adorilson