Пример #1
0
def test_apply_filters_negated_bool_fail():
    obj = MockIsovarResult(x=True)
    new_obj = apply_filters(obj, filter_flags=["not_x"])
    assert not new_obj.filter_values["not_x"]
Пример #2
0
def test_apply_filters_bool_fail():
    obj = MockIsovarResult(x=False)
    new_obj = apply_filters(obj, filter_flags=["x"])
    assert not new_obj.filter_values["x"]
Пример #3
0
def test_apply_filters_max_fail():
    obj = MockIsovarResult(x=2)
    new_obj = apply_filters(obj, filter_thresholds={"max_x": 1})
    assert not new_obj.filter_values["max_x"]
Пример #4
0
def test_apply_filters_bool_pass():
    obj = MockIsovarResult(x=True)
    new_obj = apply_filters(obj, filter_flags=["x"])
    assert new_obj.filter_values["x"]
Пример #5
0
def test_apply_filters_min_pass():
    obj = MockIsovarResult(x=1)
    new_obj = apply_filters(obj, filter_thresholds={"min_x": 1})
    assert new_obj.filter_values["min_x"]