ui.format

Support for formatting test information.

Module Members

Classes

class ui.format.TestAnnouncer(width=80, **kwargs)

Mixin that provides support for announcing test execution phases.

This is used by the built-in Reporter and Logger classes.

Arguments

width
The width to assume for formatting the output. This can be modified by the setWidth() method.

digraph foo {
rankdir=BT;
ranksep=0.3;
node[fontsize=10 margin=0.01 height=0.2 width=0.4];
edge[arrowsize=0.6 arrowhead=onormal];
"cstest.ui.format.TestAnnouncer" [color=blue height=0.4 width=0.6];
    "cstest.ui.terminal.Terminal" -> "cstest.ui.format.TestAnnouncer";
    "cstest.core.log.Logger" -> "cstest.ui.format.TestAnnouncer";
}

Subclasses: Terminal cstest.core.log.Logger

formatSuiteEntry(suite, prePadLen=0)

Format the text for suite entry announcement.

Return Value

The suite summary, suitably wrapped as a sequence of text lines.

Arguments

suite
The Suite being announced.
prePadLen
An number of spaces to assume are needed for indenting the text. This reduces the width used for paragraph formatting.
formatTestEntry(test, status, prePadLen=0)

Format the text for test entry announcement.A

Return Value

A tuple of (lines, numText, idText, dots and statusText). The lines contain the test summary, suitably wrapped.

Arguments

test
The Test being announced.
prePadLen
An number of spaces to assume are needed for indenting the text. This reduces the width used for paragraph formatting.
setWidth(width)

Set the text width used for formatting output.