Runners

runners Module

Test runner.

class impyccable.runners.Impyccable(*args, **kwargs)

Bases: object

A function decorator to provide Impyccable testing and takes generator arguments corrosponding to the functions paramaters. All arguments will be passed on in order along with all keywords to the decorated function. However the number of runs can be defined by giving the decorator an integer with the keyword “runs” without which will default to 10 runs.

Once decorated the function may be called without arguments but with an optional integer to repeat the call to the underlying fuction from new values from the generators.

However if any arguments are given to the call they will be passed along before any randomly generated arguments. This allows for methods to be tested by passing along the self instance as the first argument but can be used in other ways.

class impyccable.runners.Runner(func, *args, **kwargs)

Bases: object

Stores a given function and argument generators to execute when asked.

The resulting object is callable and can take a runs key word argument or pass along any other arguments given to it before the Impyccable generated data.

Project Versions

Table Of Contents

Previous topic

Usage

Next topic

Generators

This Page