예제 #1
0
def test_fail__valid_info_fields(arg: Any) -> None:
    with pytest.raises(ValidatorError):
        print(valid_info_fields(arg, set(["foo", "bar"])))
예제 #2
0
def test_ok__valid_info_fields(arg: Any) -> None:
    value = valid_info_fields(arg, set(["foo", "bar"]))
    assert type(value) == set  # pylint: disable=unidiomatic-typecheck
    assert value == set(filter(None, map(str.strip, str(arg).split(","))))