Utils

This module defines utils used in this package.

ska_control_model.utils.for_testing_only(func, _testing_check=<function <lambda>>)

Return a function that checks that it is being called in testing.

This is a decorator that only calls the decorated function after first checking that it is being called in testing. If called outside of testing, a warning is raised.

@for_testing_only
def _straight_to_state(self, state):
    ...
Parameters:

func (Callable[..., Any]) – the function to be decorated

Return type:

Callable[..., Any]

Returns:

the decorated function