def test_fail__valid_info_fields(arg: Any) -> None: with pytest.raises(ValidatorError): print(valid_info_fields(arg, set(["foo", "bar"])))
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(","))))