Beispiel #1
0
def test_cardinality_checker_instantiation_valid_max_proportion_unique_parameter_int(
):
    cardinality_checker: CardinalityChecker = CardinalityChecker(
        max_proportion_unique=1)
    assert isinstance(cardinality_checker.limit_mode, RelativeCardinalityLimit)
    assert cardinality_checker.limit_mode == RelativeCardinalityLimit(
        name="CUSTOM_REL_1", max_proportion_unique=1)
Beispiel #2
0
def test_cardinality_checker_instantiation_valid_limit_mode_parameter_str_relative(
):
    cardinality_checker: CardinalityChecker = CardinalityChecker(
        limit_mode="REL_0_1")
    assert cardinality_checker.limit_mode == CardinalityLimitMode.REL_0_1.value
    assert isinstance(cardinality_checker.limit_mode, RelativeCardinalityLimit)
    assert cardinality_checker.limit_mode == RelativeCardinalityLimit(
        name="REL_0_1", max_proportion_unique=0.001)