mlm_insights.tests.test_types.predicate_based_tests.interfaces package

Submodules

mlm_insights.tests.test_types.predicate_based_tests.interfaces.predicate_based_test_base module

class mlm_insights.tests.test_types.predicate_based_tests.interfaces.predicate_based_test_base.PredicateBasedTestBase(user_defined_tags: ~typing.Dict[str, str] = <factory>, lhs: ~mlm_insights.tests.selectors.interfaces.selector_base.SelectorBase | int | str | float | bool | ~typing.List[~typing.Any] | ~typing.Tuple[int, int] | None = None, rhs: ~mlm_insights.tests.selectors.interfaces.selector_base.SelectorBase | int | str | float | bool | ~typing.List[~typing.Any] | ~typing.Tuple[int, int] | None = None)

Bases: TestBase, ABC

PredicateBasedTestBase is type of Insights test where the test pattern is of following.
  1. Condition: Usually the name of the test, which inherit the condition type.

  2. lhs: left value or metric value under test

  3. rhs: right value or reference metric value under test

  4. Additional parameters

Example of PredicateBasedTests are: TestGreaterThan, TestBetween, TestDeviation, etc.

Configuration

lhsUnion[SelectorBase, ConstantValue]

It may be Insight Selector or ConstantValue.

rhsUnion[SelectorBase, ConstantValue]

It may be Insight Selector or ConstantValue.

get_left_result(test_context: TestContext) SelectorResult

Get Left result

get_non_comparable_test_error(test_name: str, left_value: int | str | float | bool | List[Any] | Tuple[int, int], right_value: int | str | float | bool | List[Any] | Tuple[int, int], test_config: Dict[str, Any] | None = None) TestResult
get_right_result(test_context: TestContext) SelectorResult

Get Right result

lhs: SelectorBase | int | str | float | bool | List[Any] | Tuple[int, int] = None
rhs: SelectorBase | int | str | float | bool | List[Any] | Tuple[int, int] = None
validate_arguments() TestValidationResult

Module contents