Module Contents

The module unittest_expander contains the following functions and classes.

(See: Narrative Module Documentation for descriptions and examples of their usage...)

The expand() class decorator

@expand(*, into=globals())
expand.global_name_pattern
expand.global_name_formatter

The foreach() method/class decorator

@foreach(param_collection)

or

@foreach(*param_collection_items, **param_collection_labeled_items)

The paramseq class

class paramseq(param_collection)

or

class paramseq(*param_collection_items, **param_collection_labeled_items)

The class has the following methods:

__add__(other)

Returns a new paramseq instance (concatenates the current instance with other).

__radd__(other)

Returns a new paramseq instance (concatenates other with the current instance).

context(context_manager_factory, *its_args, **its_kwargs)

Returns a new paramseq instance contaning the same items as the current instance – but each item with the specified context factory attached.

The param class

class param(*args, **kwargs)

The class has the following methods:

context(context_manager_factory, *its_args, **its_kwargs)

Returns a new param instance being a clone of the current instance, with the specified context factory attached.

label(text)

Returns a new param instance being a clone of the current instance, with the specified label text attached.

The Substitute class

class Substitute(actual_object)
actual_object