Home | History | Annotate | Download | only in test

Lines Matching refs:traceback

1 """Test cases for traceback module"""
10 import traceback
21 return traceback.format_exception_only(exc, value)
32 # XXX why doesn't compile raise the same traceback?
89 traceback.extract_tb(sys.exc_traceback)
106 src = traceback.extract_tb(sys.exc_traceback)[-1][-1]
117 lst = traceback.format_exception_only(e.__class__, e)
138 err = traceback.format_exception_only(str_type, None)
145 err = traceback.format_exception_only(str_type, str_value)
153 err = traceback.format_exception_only(X, X())
159 err = traceback.format_exception_only(None, None)
164 lines = traceback.format_exception_only(type(err), err)
168 lines = traceback.format_exception_only(type(err), err)
179 traceback_fmt = 'Traceback (most recent call last):\n' + \
180 ''.join(traceback.format_tb(tb))
185 raise Error("unable to create test traceback string")
187 # Make sure that Python and the traceback module format the same thing
190 # Make sure that the traceback is properly indented.
194 self.assertTrue(banner.startswith('Traceback'))