========= ui.format ========= .. toctree:: :hidden: .. index:: ui.format .. module:: ui.format :noindex: Support for formatting test information. Module Members ============== | :class:`~TestAnnouncer` Classes ------- .. class:: TestAnnouncer(width=80, \*\*kwargs) Mixin that provides support for announcing test execution phases. This is used by the built-in :class:`Reporter` and :class:`Logger` classes. **Arguments** width The width to assume for formatting the output. This can be modified by the :meth:`setWidth` method. .. graphviz:: 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: :class:`~cstest.ui.terminal.Terminal` cstest.core.log.Logger .. method:: formatSuiteEntry(suite, prePadLen=0) :noindex: Format the text for suite entry announcement. **Return Value** The suite summary, suitably wrapped as a sequence of text lines. **Arguments** *suite* The :class:`Suite` being announced. *prePadLen* An number of spaces to assume are needed for indenting the text. This reduces the width used for paragraph formatting. .. method:: formatTestEntry(test, status, prePadLen=0) :noindex: 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 :class:`Test` being announced. *prePadLen* An number of spaces to assume are needed for indenting the text. This reduces the width used for paragraph formatting. .. method:: setWidth(width) :noindex: Set the text width used for formatting output.