Doctest is a module that is included in Python’s standard distribution and is used for White-box Unit Testing.
It searches for interactive python sessions to check if they are working exactly as required.
It makes use of selective Python capabilities such as docstrings, The Python interactive shell and Python introspection (determining properties of objects at runtime).
Core Functions:
Updating docstring
Performing Regression Testing
The functions testfile() and testmod() are used to provide basic interface.