Yes. You can do it. The doctest module documentation and Wikipedia has an example of it.
>>> x
Traceback (most recent call last):
...
NameError: name 'x' is not defined
Yes. You can do it. The doctest module documentation and Wikipedia has an example of it.
>>> x
Traceback (most recent call last):
...
NameError: name 'x' is not defined