def test_type(val, mytype):
    """ Check value fits one of the types, if so return true, else false """

    typelist = TYPES.get(mytype.lower())

    if typelist is None:
        raise TypeError(
            "Type {0} is not a valid type to test against!".format(mytype.lower()))
    try:
        for testtype in typelist:
            if isinstance(val, testtype):
                return True
        return False
    except __HOLE__:
        return isinstance(val, typelist)

# Unury comparison tests
dataset/ETHPy150Open svanoort/pyresttest/pyresttest/validators.py/test_type