Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32k
Closed
Description
There are several issues with error reports when doctests are wrapped inDocTestCase
.
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) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
When the output differs, the traceback of AssertionError contains other line from
doctest.py
:Traceback (most recent call last): File ... raise self.failureException(self.format_failure(new.getvalue()))
Also, the AssertionError message contains redundant newline character.
Linked PRs
Metadata
Metadata
Assignees
Projects
Status
Done