# Path: doubles/exceptions.py
# class VerifyingDoubleImportError(AssertionError):
#     """
#     An exception raised when attempting to create a verifying double from an invalid module path.
#     """


from importlib import import_module
from doubles.exceptions import VerifyingDoubleImportError



def get_module(module_path, full_path):
    """Return the module given its path.

    :param str module_path: The path to the module to import.
    :param str full_path: The full path to the class that will be doubled.
    :return: The module object.
    :rtype: module
    :raise: ``VerifyingDoubleImportError`` if the module can't be imported.
    """

    try:
        return import_module(module_path)
    except ImportError:

# Path: doubles/exceptions.py
# class VerifyingDoubleImportError(AssertionError):
#     """
#     An exception raised when attempting to create a verifying double from an invalid module path.
#     """


# Path: doubles/utils.py
from importlib import import_module
from doubles.exceptions import VerifyingDoubleImportError




def get_module(module_path, full_path):
    """Return the module given its path.

    :param str module_path: The path to the module to import.
    :param str full_path: The full path to the class that will be doubled.
    :return: The module object.
    :rtype: module
    :raise: ``VerifyingDoubleImportError`` if the module can't be imported.
    """

    try:
        return import_module(module_path)
    except ImportError:

        raise VerifyingDoubleImportError('Cannot import object from path: {}.'.format(full_path))