summaryrefslogtreecommitdiffstats
path: root/Lib/doctest.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2006-08-26 20:37:44 (GMT)
committerGuido van Rossum <guido@python.org>2006-08-26 20:37:44 (GMT)
commit6a2a2a08329567ea41f4f073cb43e487f83872c7 (patch)
tree63fffe60ff821be1660fe50ae7b5a06fac5936e8 /Lib/doctest.py
parent59baa759e4cc4ab66f240f35e3cb7edfb4375952 (diff)
downloadcpython-6a2a2a08329567ea41f4f073cb43e487f83872c7.zip
cpython-6a2a2a08329567ea41f4f073cb43e487f83872c7.tar.gz
cpython-6a2a2a08329567ea41f4f073cb43e487f83872c7.tar.bz2
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.
Diffstat (limited to 'Lib/doctest.py')
-rw-r--r--Lib/doctest.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/doctest.py b/Lib/doctest.py
index 2774ec1..7160907 100644
--- a/Lib/doctest.py
+++ b/Lib/doctest.py
@@ -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