Utility Functions

Conditions

The ppc_robot_lib.steps.conditions module contains several factories for condition callables.

table_empty(table_name)[source]

Creates a callable that checks whether a table of given name is empty.

Parameters:

table_name (str) – Name of the table to check.

Return type:

Callable[[TaskContextInterface], bool]

Returns:

Callable that receives TaskContext and returns whether the given table is empty.

table_min_rows(table_name, min_rows)[source]

Creates a callable that checks whether a table of given name contains at least ``min_rows`` rows.

Parameters:
  • table_name (str) – Name of the table to check.

  • min_rows – Minimum number of rows that are required to trigger the condition.

Return type:

Callable[[TaskContextInterface], bool]

Returns:

Callable that receives TaskContext and returns whether the given table contains at least min_rows rows.

table_not_empty(table_name)[source]

Creates a callable that checks whether a table of given name is not empty.

Parameters:

table_name (str) – Name of the table to check.

Return type:

Callable[[TaskContextInterface], bool]

Returns:

Callable that receives TaskContext and returns whether the given table is not empty.