Content object for stack lines.

This adapts a list of "preprocessed" stack lines into a 'Content' object. The stack lines are most likely produced from traceback.extract_stack or traceback.extract_tb.

text/x-traceback;language=python is used for the mime type, in order to provide room for other languages to format their tracebacks differently.

Method __init__ Create a StackLinesContent for stack_lines.
Method _stack_lines_to_unicode Converts a list of pre-processed stack lines into a unicode string.

Inherited from Content:

Instance Variable content_type The content type of this Content.
Method __eq__ Undocumented
Method as_text Return all of the content as text.
Method iter_bytes Iterate over bytestrings of the serialised content.
Method iter_text Iterate over the text of the serialised content.
Method __repr__ Undocumented
Method _iter_text Worker for iter_text - does the decoding.
def __init__(self, stack_lines, prefix_content='', postfix_content=''):
Create a StackLinesContent for stack_lines.
Parametersstack_linesA list of preprocessed stack lines, probably obtained by calling traceback.extract_stack or traceback.extract_tb.
prefix_contentIf specified, a unicode string to prepend to the text content.
postfix_contentIf specified, a unicode string to append to the text content.
def _stack_lines_to_unicode(self, stack_lines):
Converts a list of pre-processed stack lines into a unicode string.
API Documentation for testtools, generated by pydoctor at 2015-07-01 16:11:28.