mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Inspired by SF patch #860326, make the exception formatting by
traceback.py be closer to the built-in formatting. A few unittests had to be fixed, too.
This commit is contained in:
parent
59baa759e4
commit
6a2a2a0832
6 changed files with 13 additions and 8 deletions
|
@ -1581,7 +1581,7 @@ class UnexpectedException(Exception):
|
|||
|
||||
- test: the DocTest object being run
|
||||
|
||||
- excample: the Example object that failed
|
||||
- example: the Example object that failed
|
||||
|
||||
- exc_info: the exception info
|
||||
"""
|
||||
|
@ -1664,7 +1664,7 @@ class DebugRunner(DocTestRunner):
|
|||
>>> runner.run(test)
|
||||
Traceback (most recent call last):
|
||||
...
|
||||
UnexpectedException: <DocTest foo from foo.py:0 (2 examples)>
|
||||
doctest.UnexpectedException: <DocTest foo from foo.py:0 (2 examples)>
|
||||
|
||||
>>> del test.globs['__builtins__']
|
||||
>>> test.globs
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue