mlm_insights.tests.test_types.interfaces package

Submodules

mlm_insights.tests.test_types.interfaces.test_base module

class mlm_insights.tests.test_types.interfaces.test_base.TestBase(user_defined_tags: Dict[str, str] = <factory>)

Bases: ABC

abstract execute(test_context: TestContext, *args: Any, **kwargs: Any) → TestResult

Execute the test and return the TestResult. It uses TestContext to query required metric data.

Parameters

test_context : TestContext, args:

Additional arguments, implemented as per child class.

kwargs:

Key-value pair for dynamic arguments.

Returns

TestResult

get_test_error_result(description: str, error_string: str, test_config: Dict[str, Any] | None = None, system_tags: Dict[str, str] = {}) → TestResult
get_test_name() → str

Returns the name of the test.

get_test_result(description: str, status: TestStatus, test_assertion_info: TestAssertionInfo, system_tags: Dict[str, str] = {}, test_config: Dict[str, Any] = {}) → TestResult
classmethod is_valid_types(value: Any, types: Any) → bool
user_defined_tags: Dict[str, str]

TestBase interface provide a skeleton for write Insight tests. Child class must implement execute and validate methods.

abstract validate(test_context: TestContext, *args: Any, **kwargs: Any) → TestValidationResult

Pre validated the test before executing. It can be used to validate all its parameters and test_context.

Parameters

test_context : TestContext args:

Additional arguments, implemented as per child class.

kwargs:

Key-value pair for dynamic arguments.

Returns

TestValidationResult

Module contents