-
-
Notifications
You must be signed in to change notification settings - Fork 33.1k
Closed
Labels
3.14bugs and security fixesbugs and security fixes3.15new features, bugs and security fixesnew features, bugs and security fixes
Description
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
: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
Labels
3.14bugs and security fixesbugs and security fixes3.15new features, bugs and security fixesnew features, bugs and security fixes
Projects
Status
Done