PyDocs

Nav

Python Runtime Services

module.__test__

builtins

attribute
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 tests. If M.__test__ exists, it must be a dict, and each entry maps a (string) name to a function object, class object, or string. Function and class object docstrings found from M.__test__ are searched, and strings are treated as if they were docstrings. In output, a key K in M.__test__ appears with name M.__test__.K.
0 Examples
No examples for builtins/module.__test__.
See Also
No see-alsos for builtins/module.__test__
0 Notes
No notes for module.__test__