def get_error_type_and_message(obj, method_name, arg):
    """Return (type, message) of raised error.

    obj (any Python obj)
        obj from which to retrieve method.
    method_name (string)
        name of method to be tested.
    arg (any Python obj)
        argument to be tested on the method.
    """
    method = getattr(obj, method_name)

    try:
        method(arg)

    except Exception as err:

        error_type = type(err)
        error_msg = remove_hex(str(err))

    else:
        raise RuntimeError("Errors should have been raised, but weren't")

    return (error_type, error_msg)
Return (type, message) of raised error.

    obj (any Python obj)
        obj from which to retrieve method.
    method_name (string)
        name of method to be tested.
    arg (any Python obj)
        argument to be tested on the method.
    
nodezator/rectsman/doctests/fixtures.py