exopy.testing.tasks.util module

Utility object to test the execution of tasks.

class exopy.testing.tasks.util.CheckTask[source]

Bases: exopy.tasks.tasks.base_tasks.SimpleTask

Task keeping track of check and perform call and value passed to perform

check_called

Number of time the check method has been called.

perform_called

Number of time the perform method has been called.

perform_value

Value passed to the perform method.

custom

Function to call in the perform method

check(*args, **kwargs)[source]

Check that everything is alright before starting a measurement.

By default tries to format all members tagged with ‘fmt’ and try to eval all members tagged with ‘feval’.

perform(value=None)[source]

Main method of the task called when the measurement is performed.

class exopy.testing.tasks.util.ExceptionTask[source]

Bases: exopy.tasks.tasks.base_tasks.SimpleTask

Task raising an exception when executed.

perform()[source]

Main method of the task called when the measurement is performed.