def test_invalid_type_for_optional_value(self): with pytest.raises(errors.Error, match="should"): bonsai_asset.validate("a", dict(a=3), False, dict)
def test_missing_required(self): with pytest.raises(errors.Error, match="required"): bonsai_asset.validate("a", {}, True, str)
def test_invalid_type(self): with pytest.raises(errors.Error, match="should"): bonsai_asset.validate("a", dict(a=3), True, str)
def test_valid_values(self, name, args, required, typ): bonsai_asset.validate(name, args, required, typ)