diff options
author | Anthony Baxter <anthonybaxter@gmail.com> | 2006-04-13 01:34:33 (GMT) |
---|---|---|
committer | Anthony Baxter <anthonybaxter@gmail.com> | 2006-04-13 01:34:33 (GMT) |
commit | 57fdcbc60ff8bbb0261f5dba47580194d45c31a3 (patch) | |
tree | 47bfce64626a6f5b70ffd03974ffe146a3960627 /Lib/test | |
parent | d691f1a35f370321e1cf768b2164308cb20d2b63 (diff) | |
download | cpython-57fdcbc60ff8bbb0261f5dba47580194d45c31a3.zip cpython-57fdcbc60ff8bbb0261f5dba47580194d45c31a3.tar.gz cpython-57fdcbc60ff8bbb0261f5dba47580194d45c31a3.tar.bz2 |
reverting r45321: Patch #860326: traceback.format_exception_only() now
prepends the exception's module name to non-builtin exceptions, like
the interpreter itself does.
broke a number of doctests. should be discussed before checking in (see
discussion on python-dev).
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_traceback.py | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/Lib/test/test_traceback.py b/Lib/test/test_traceback.py index 26ab7dc..22c0456 100644 --- a/Lib/test/test_traceback.py +++ b/Lib/test/test_traceback.py @@ -5,9 +5,6 @@ from test.test_support import run_unittest, is_jython import traceback -class TbError(Exception): - pass - class TracebackCases(unittest.TestCase): # For now, a very minimal set of tests. I want to be sure that # formatting of SyntaxErrors works based on changes for 2.1. @@ -106,24 +103,6 @@ def test(): import sys sys.exc_traceback.__members__ - def raise_tberror(self): - raise TbError - - def raise_typeerror(self): - raise TypeError - - def test_modulename(self): - # Bug 860326: format_exception_only should prepend module name - # to exceptions not in "exceptions", like PyErr_Print does. - err = self.get_exception_format(self.raise_tberror, TbError) - self.assertEquals(len(err), 1) - self.assert_(err[0] == '__main__.TbError\n' or - err[0] == 'test.test_traceback.TbError\n') - - err = self.get_exception_format(self.raise_typeerror, TypeError) - self.assertEquals(err[0], 'TypeError\n') - - def test_main(): run_unittest(TracebackCases) |