testplan.testing.multitest.entries.stdout package

Submodules

testplan.testing.multitest.entries.stdout.assertions module

Loggers for assertion objects

class testplan.testing.multitest.entries.stdout.assertions.ApproximateEqualityAssertionRenderer[source]

Bases: testplan.testing.multitest.entries.stdout.assertions.AssertionRenderer

get_assertion_details(entry)[source]

Use a format like 99 ~= 100 (with rel_tol=0.1, abs_tol=0.0), highlighting failing comparisons in red.

get_default_header(entry)
get_details(entry)

Return file & line no (failing entries only), along with the extra info returned by get_assertion_details.

get_header(entry)
get_header_text(entry)
pass_label(entry)
class testplan.testing.multitest.entries.stdout.assertions.AssertionRenderer[source]

Bases: testplan.testing.multitest.entries.stdout.base.BaseRenderer

Default assertion logger. Renders simple details (file & line no), and assertion name/description and pass/fail status as header.

get_assertion_details(entry)[source]
get_default_header(entry)
get_details(entry)[source]

Return file & line no (failing entries only), along with the extra info returned by get_assertion_details.

get_header(entry)[source]
get_header_text(entry)
pass_label(entry)[source]
class testplan.testing.multitest.entries.stdout.assertions.ColumnContainRenderer[source]

Bases: testplan.testing.multitest.entries.stdout.assertions.AssertionRenderer

get_assertion_details(entry)[source]
get_default_header(entry)
get_details(entry)

Return file & line no (failing entries only), along with the extra info returned by get_assertion_details.

get_header(entry)
get_header_text(entry)
pass_label(entry)
class testplan.testing.multitest.entries.stdout.assertions.DictCheckRenderer[source]

Bases: testplan.testing.multitest.entries.stdout.assertions.AssertionRenderer

get_assertion_details(entry)[source]

Return has_keys & absent_keys context

get_default_header(entry)
get_details(entry)

Return file & line no (failing entries only), along with the extra info returned by get_assertion_details.

get_header(entry)
get_header_text(entry)
pass_label(entry)
class testplan.testing.multitest.entries.stdout.assertions.DictMatchAllRenderer[source]

Bases: testplan.testing.multitest.entries.stdout.assertions.AssertionRenderer

get_assertion_details(entry)[source]

Return fix and dict match_all result representations

get_default_header(entry)
get_details(entry)

Return file & line no (failing entries only), along with the extra info returned by get_assertion_details.

get_header(entry)
get_header_text(entry)
pass_label(entry)
class testplan.testing.multitest.entries.stdout.assertions.DictMatchRenderer[source]

Bases: testplan.testing.multitest.entries.stdout.assertions.AssertionRenderer

get_assertion_details(entry)[source]

Return fix and dict match result representations

get_default_header(entry)
get_details(entry)

Return file & line no (failing entries only), along with the extra info returned by get_assertion_details.

get_header(entry)
get_header_text(entry)
pass_label(entry)
class testplan.testing.multitest.entries.stdout.assertions.EqualExcludeSlicesRenderer[source]

Bases: testplan.testing.multitest.entries.stdout.assertions.AssertionRenderer

Display excluded indexes, compared indexes, actual and expected iterables.

get_assertion_details(entry)[source]
get_default_header(entry)
get_details(entry)

Return file & line no (failing entries only), along with the extra info returned by get_assertion_details.

get_header(entry)
get_header_text(entry)
pass_label(entry)
class testplan.testing.multitest.entries.stdout.assertions.EqualSlicesRenderer[source]

Bases: testplan.testing.multitest.entries.stdout.assertions.AssertionRenderer

Display slice, comparison indexes, mismatch indexes, actual and expected iterables.

Sample output:

Equal Slices - Pass
slice(2, 4, None)
Actual: [3, 4] Expected: [3, 4]
slice(5, 7, None)
Actual: [‘d’, ‘e’] Expected: [6, 7]
get_assertion_details(entry)[source]
get_default_header(entry)
get_details(entry)

Return file & line no (failing entries only), along with the extra info returned by get_assertion_details.

get_header(entry)
get_header_text(entry)
pass_label(entry)
class testplan.testing.multitest.entries.stdout.assertions.ExceptionRaisedRenderer[source]

Bases: testplan.testing.multitest.entries.stdout.assertions.AssertionRenderer

get_assertion_details(entry)[source]
get_default_header(entry)
get_details(entry)

Return file & line no (failing entries only), along with the extra info returned by get_assertion_details.

get_header(entry)
get_header_text(entry)
pass_label(entry)
class testplan.testing.multitest.entries.stdout.assertions.FailRenderer[source]

Bases: testplan.testing.multitest.entries.stdout.assertions.AssertionRenderer

get_assertion_details(entry)[source]
get_default_header(entry)
get_details(entry)

Return file & line no (failing entries only), along with the extra info returned by get_assertion_details.

get_header(entry)[source]
get_header_text(entry)
pass_label(entry)
class testplan.testing.multitest.entries.stdout.assertions.FunctionAssertionRenderer[source]

Bases: testplan.testing.multitest.entries.stdout.assertions.AssertionRenderer

get_assertion_details(entry)[source]

Use a format like 1 == 2, highlighting failing comparisons in red.

get_default_header(entry)
get_details(entry)

Return file & line no (failing entries only), along with the extra info returned by get_assertion_details.

get_header(entry)
get_header_text(entry)
pass_label(entry)
class testplan.testing.multitest.entries.stdout.assertions.LineDiffRenderer[source]

Bases: testplan.testing.multitest.entries.stdout.assertions.AssertionRenderer

Display 2 blocks of textual content, truncate them if too long, also display the difference between them if found.

get_assertion_details(entry)[source]
get_default_header(entry)
get_details(entry)

Return file & line no (failing entries only), along with the extra info returned by get_assertion_details.

get_header(entry)
get_header_text(entry)
pass_label(entry)
class testplan.testing.multitest.entries.stdout.assertions.MembershipRenderer[source]

Bases: testplan.testing.multitest.entries.stdout.assertions.AssertionRenderer

get_assertion_details(entry)[source]

Return the member and container representations

get_default_header(entry)
get_details(entry)

Return file & line no (failing entries only), along with the extra info returned by get_assertion_details.

get_header(entry)
get_header_text(entry)
pass_label(entry)
class testplan.testing.multitest.entries.stdout.assertions.RegexFindIterRenderer[source]

Bases: testplan.testing.multitest.entries.stdout.assertions.RegexMatchRenderer

get_assertion_details(entry)[source]

Render condition attribute as well, if it exists

get_default_header(entry)
get_details(entry)

Return file & line no (failing entries only), along with the extra info returned by get_assertion_details.

get_header(entry)
get_header_text(entry)
highlight_color = 'green'
pass_label(entry)
class testplan.testing.multitest.entries.stdout.assertions.RegexMatchLineRenderer[source]

Bases: testplan.testing.multitest.entries.stdout.assertions.AssertionRenderer

get_assertion_details(entry)[source]

RegexMatchLine returns line indexes along with begin/end character indexes per matched line. Note: pattern & string (despite the name) could be bytes

get_default_header(entry)
get_details(entry)

Return file & line no (failing entries only), along with the extra info returned by get_assertion_details.

get_header(entry)
get_header_text(entry)
pass_label(entry)
class testplan.testing.multitest.entries.stdout.assertions.RegexMatchRenderer[source]

Bases: testplan.testing.multitest.entries.stdout.assertions.AssertionRenderer

get_assertion_details(entry)[source]

Return highlighted patterns within the string, if there is a match. Note that pattern & string (despite the name) could be bytes

get_default_header(entry)
get_details(entry)

Return file & line no (failing entries only), along with the extra info returned by get_assertion_details.

get_header(entry)
get_header_text(entry)
highlight_color = 'green'
pass_label(entry)
class testplan.testing.multitest.entries.stdout.assertions.RegexNotMatchRenderer[source]

Bases: testplan.testing.multitest.entries.stdout.assertions.RegexMatchRenderer

get_assertion_details(entry)

Return highlighted patterns within the string, if there is a match. Note that pattern & string (despite the name) could be bytes

get_default_header(entry)
get_details(entry)

Return file & line no (failing entries only), along with the extra info returned by get_assertion_details.

get_header(entry)
get_header_text(entry)
highlight_color = 'red'
pass_label(entry)
class testplan.testing.multitest.entries.stdout.assertions.TableMatchRenderer[source]

Bases: testplan.testing.multitest.entries.stdout.assertions.AssertionRenderer

Renders tabular data in ASCII table format

Sample output:

age name
32 == 32 24 == 24 67 == 67 Bob == Bob Susan == Susan Rick != David
get_assertion_details(entry)[source]

Return row by row match results in tabular format

get_default_header(entry)
get_details(entry)

Return file & line no (failing entries only), along with the extra info returned by get_assertion_details.

get_header(entry)
get_header_text(entry)
get_row_data(row_comparison, columns, include_columns=None, exclude_columns=None, display_index=False)[source]

Return single row data to be printed

pass_label(entry)
class testplan.testing.multitest.entries.stdout.assertions.XMLCheckRenderer[source]

Bases: testplan.testing.multitest.entries.stdout.assertions.AssertionRenderer

Renderer for XMLCheck

get_assertion_details(entry)[source]

Render the message if there is any, then render XMLTagComparison items.

get_default_header(entry)
get_details(entry)

Return file & line no (failing entries only), along with the extra info returned by get_assertion_details.

get_header(entry)
get_header_text(entry)
pass_label(entry)
testplan.testing.multitest.entries.stdout.assertions.add_printable_dict_comparison(result, row)[source]

Stdout representation of fix/dict match rows.

testplan.testing.multitest.entries.stdout.base module

Stdout renderers for assertion/entry objects.

Unlike exporters, stdout renderers receive native entry objects, instead of their serialized (dict) versions.

class testplan.testing.multitest.entries.stdout.base.AttachmentRenderer[source]

Bases: testplan.testing.multitest.entries.stdout.base.BaseRenderer

get_default_header(entry)
get_details(entry)[source]
get_header(entry)
get_header_text(entry)
class testplan.testing.multitest.entries.stdout.base.BaseRenderer[source]

Bases: object

Absolute fallback for all entries.

get_default_header(entry)[source]
get_details(entry)[source]
get_header(entry)[source]
get_header_text(entry)[source]
class testplan.testing.multitest.entries.stdout.base.DictLogRenderer[source]

Bases: testplan.testing.multitest.entries.stdout.base.BaseRenderer

get_default_header(entry)
get_details(entry)[source]
get_header(entry)
get_header_text(entry)
class testplan.testing.multitest.entries.stdout.base.DirectoryRenderer[source]

Bases: testplan.testing.multitest.entries.stdout.base.BaseRenderer

get_default_header(entry)
get_details(entry)[source]
get_header(entry)
get_header_text(entry)
class testplan.testing.multitest.entries.stdout.base.GroupRenderer[source]

Bases: object

get_header(entry)[source]
class testplan.testing.multitest.entries.stdout.base.LogRenderer[source]

Bases: testplan.testing.multitest.entries.stdout.base.BaseRenderer

get_default_header(entry)
get_details(entry)[source]
get_header(entry)[source]
get_header_text(entry)
class testplan.testing.multitest.entries.stdout.base.MatPlotRenderer[source]

Bases: testplan.testing.multitest.entries.stdout.base.BaseRenderer

get_default_header(entry)
get_details(entry)[source]
get_header(entry)
get_header_text(entry)
class testplan.testing.multitest.entries.stdout.base.PlotlyRenderer[source]

Bases: testplan.testing.multitest.entries.stdout.base.BaseRenderer

get_default_header(entry)
get_details(entry)[source]
get_header(entry)
get_header_text(entry)
class testplan.testing.multitest.entries.stdout.base.StdOutRegistry[source]

Bases: testplan.common.utils.registry.Registry

bind(*classes)

Decorator for binding one or more classes to another.

Parameters:classes – One or more classes that will be bound to the decorated class.
bind_default(category=None)

Decorator for binding a class as category based or absolute default.

Parameters:category – (optional) If provided, the decorated class will be the default for the given category, otherwise it will be the absolute default.
default
get_category(obj)[source]

Override this to define logic for generating the category key from the object instance.

get_lookup_key(obj)

This method is used for generating the key when do a lookup from the registry. Object class is used by default.

get_record_key(obj)

This method is used for generating the key when we bind an object (possibly a class) via the registry.

indented_msg(msg, indent)[source]
log_entry(entry, stdout_style)[source]
logger

logger object

class testplan.testing.multitest.entries.stdout.base.TableLogRenderer[source]

Bases: testplan.testing.multitest.entries.stdout.base.BaseRenderer

get_default_header(entry)
get_details(entry: testplan.testing.multitest.entries.base.TableLog) → str[source]

This method converts the entire input table into a string using AsciiTable.

Parameters:entry – the TableLog object we want to convert
Returns:rows of the input table joined into a single string with newline characters
get_header(entry)
get_header_text(entry)

Module contents

This module contains logic for printing out assertion details as tests run.