From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Tue, 15 Jul 2025 15:58:52 +0000 (+0200) Subject: [3.14] Fix index entry and anchor for module.__test__ (GH-136674) (GH-136688) X-Git-Tag: v3.14.0rc1~69 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=323974295d099d9a9ff87887d5e4116b01367141;p=thirdparty%2FPython%2Fcpython.git [3.14] Fix index entry and anchor for module.__test__ (GH-136674) (GH-136688) It was "doctest.module attribute". Now it is "module attribute". (cherry picked from commit 7689407fa4406ab79d7e9e02363f50be4ec35b5e) Co-authored-by: Serhiy Storchaka --- diff --git a/Doc/library/doctest.rst b/Doc/library/doctest.rst index 8236d703fc1e..82e570a2a85c 100644 --- a/Doc/library/doctest.rst +++ b/Doc/library/doctest.rst @@ -311,9 +311,13 @@ Which Docstrings Are Examined? The module docstring, and all function, class and method docstrings are searched. Objects imported into the module are not searched. +.. currentmodule:: None + .. attribute:: module.__test__ :no-typesetting: +.. currentmodule:: doctest + In addition, there are cases when you want tests to be part of a module but not part of the help text, which requires that the tests not be included in the docstring. Doctest looks for a module-level variable called ``__test__`` and uses it to locate other