Working of doctest Module

Let's find out how doctest module works.

We'll cover the following...

The doctest module works by examining the docstrings in the module, from the module level to the function, class and method levels. It will not look at imported modules though. For most of the part, we can use just copy-and-paste an interactive console session, and doctest module will work fine with it. ...