When error happens during compilation or execution an example, the traceback contains several lines from doctest.py:
File ...
exec(compile(example.source, filename, "single",
~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
compileflags, True), test.globs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
There are several issues with error reports when doctests are wrapped in
DocTestCase.When error happens during compilation or execution an example, the traceback contains several lines from
doctest.py:When the output differs, the traceback of AssertionError contains other line from
doctest.py:Also, the AssertionError message contains redundant newline character.
Linked PRs