summaryrefslogtreecommitdiff
path: root/Lib/test/test_traceback.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2006-08-26 20:37:44 +0000
committerGuido van Rossum <guido@python.org>2006-08-26 20:37:44 +0000
commit6a2a2a08329567ea41f4f073cb43e487f83872c7 (patch)
tree63fffe60ff821be1660fe50ae7b5a06fac5936e8 /Lib/test/test_traceback.py
parent59baa759e4cc4ab66f240f35e3cb7edfb4375952 (diff)
downloadcpython-git-6a2a2a08329567ea41f4f073cb43e487f83872c7.tar.gz
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/test/test_traceback.py')
-rw-r--r--Lib/test/test_traceback.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/test_traceback.py b/Lib/test/test_traceback.py
index 6f9e46476a..9ba1dca23d 100644
--- a/Lib/test/test_traceback.py
+++ b/Lib/test/test_traceback.py
@@ -118,7 +118,9 @@ def test():
err = traceback.format_exception_only(X, X())
self.assertEqual(len(err), 1)
str_value = '<unprintable %s object>' % X.__name__
- self.assertEqual(err[0], X.__name__ + ': ' + str_value + '\n')
+ self.assertEqual(err[0], "%s.%s: %s\n" % (X.__module__,
+ X.__name__,
+ str_value))
def test_main():