diff --git a/Doc/library/doctest.rst b/Doc/library/doctest.rst index 3cf2a6bbbd0cbd..d1ccfc20981523 100644 --- a/Doc/library/doctest.rst +++ b/Doc/library/doctest.rst @@ -307,9 +307,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