873
899
# from testtools. However, 'OutputFormatter' contains special logic to
874
900
# handle errors from doctests, so we have to use that and manually
875
901
# create an object equivalent to an instance of 'TracebackContent'.
878
'text', 'x-traceback', dict(language='python', charset='utf8'))
879
902
formatter = OutputFormatter(None)
880
903
traceback = formatter.format_traceback(exc_info)
885
908
def test_error(self, test, seconds, exc_info):
886
909
"""Report that an error occurred while running a test.