# Path: mcm/validators.py
# def validate_list(lst, allowed):
# 
#     forbidden = set(lst) - set(allowed)
#     if forbidden:
#         raise ValidateError()
# 
# def validate_value(val, allowed):
# 
#     if val not in allowed:
#         raise ValidateError()
# 
# def validate_type(val, allowed):
# 
#     if type(val) != allowed:
#         raise ValidateError()
# 
# Path: mcm/exceptions.py
# class ValidateError(Exception):
#     '''
#     Exception raised when a general validation error occurs.
#     '''


import pytest
from mcm.validators import validate_list, validate_value, validate_type
from mcm.exceptions import ValidateError
# -*- coding: UTF-8 -*-




def test_validate_list_raises_ValidateError_when_list_passed_contains_forbidden_elements():
    with pytest.raises(ValidateError):
        validate_list(lst=[1,2,3], allowed=[1,2] )


def test_validate_val_raises_ValidateError_when_value_passed_is_not_in_allowed():

# Path: mcm/validators.py
# def validate_list(lst, allowed):
# 
#     forbidden = set(lst) - set(allowed)
#     if forbidden:
#         raise ValidateError()
# 
# def validate_value(val, allowed):
# 
#     if val not in allowed:
#         raise ValidateError()
# 
# def validate_type(val, allowed):
# 
#     if type(val) != allowed:
#         raise ValidateError()
# 
# Path: mcm/exceptions.py
# class ValidateError(Exception):
#     '''
#     Exception raised when a general validation error occurs.
#     '''


# Path: tests/test_validators.py
import pytest
from mcm.validators import validate_list, validate_value, validate_type
from mcm.exceptions import ValidateError

# -*- coding: UTF-8 -*-




def test_validate_list_raises_ValidateError_when_list_passed_contains_forbidden_elements():
    with pytest.raises(ValidateError):
        validate_list(lst=[1,2,3], allowed=[1,2] )


def test_validate_val_raises_ValidateError_when_value_passed_is_not_in_allowed():

    with pytest.raises(ValidateError):