Skip to content

Doc/library/turtle.rst doctests are failing when tkinter is not present #111735

Description

@sobolevn

Bug report

There are multiple places where :skipif: _tkinter is None is missing. So, local builds are failing with something like:

Document: library/turtle
------------------------

Warning, treated as error:
**********************************************************************
File "library/turtle.rst", line 2797, in default
Failed example:
    for turtle in turtles():
         turtle.reset()
Exception raised:
    Traceback (most recent call last):
      File "/Users/sobolev/Desktop/cpython2/Lib/doctest.py", line 1374, in __run
        exec(compile(example.source, filename, "single",
      File "<doctest default[0]>", line 1, in <module>
        for turtle in turtles():
                      ^^^^^^^
    NameError: name 'turtles' is not defined

make[1]: *** [build] Error 2
Testing of doctests in the sources finished, look at the results in build/doctest/output.txt
make: *** [doctest] Error 1

I have a PR ready.

Linked PRs

Metadata

Metadata

Assignees

Labels

docsDocumentation in the Doc dirtestsTests in the Lib/test dirtopic-tkintertype-bugAn unexpected behavior, bug, or error

Projects

Status
No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions