# Path: doubles/exceptions.py
# class VerifyingDoubleArgumentError(AssertionError):
#     """
#     An exception raised when attempting to double a method with arguments that do not match the
#     signature of the real method.
#     """
# 
#     pass
# 
# class VerifyingBuiltinDoubleArgumentError(VerifyingDoubleArgumentError):
#     """
#     An exception raised when attempting to validate arguments of a builtin.
#     """
# 
#     pass
# 
# class VerifyingDoubleError(AssertionError):
#     """
#     An exception raised when attempting to double a method that does not exist on the real object.
#     """
# 
#     def __init__(self, method_name, doubled_obj):
#         """
#         :param str method_name: The name of the method to double.
#         :param object doubled_obj: The real object being doubled.
#         """
# 
#         self._method_name = method_name
#         self._doubled_obj = doubled_obj
#         self.args = (method_name, doubled_obj)
#         self.message = "Cannot double method '{}' of '{}'."
# 
#     def no_matching_method(self):
#         self.message = "Cannot double method '{}' because {} does not implement it."
# 
#         return self
# 
#     def not_callable(self):
#         self.message = "Cannot double method '{}' because it is not a callable attribute on {}."
# 
#         return self
# 
#     def requires_instance(self):
#         self.message = "Cannot double method '{}' because it is not callable directly on {}."
# 
#         return self
# 
#     def __str__(self):
#         return self.message.format(self._method_name, self._doubled_obj)


import sys
from inspect import isbuiltin, getcallargs, isfunction, ismethod
from doubles.exceptions import (
    VerifyingDoubleArgumentError,
    VerifyingBuiltinDoubleArgumentError,
    VerifyingDoubleError,
)


ACCEPTS_ARGS = (list, tuple, set)
ACCEPTS_KWARGS = (dict,)


if sys.version_info >= (3, 0):
    def _get_func_object(func):
        return func.__func__
else:
    def _get_func_object(func):
        return func.im_func


def _is_python_function(func):
    if ismethod(func):

# Path: doubles/exceptions.py
# class VerifyingDoubleArgumentError(AssertionError):
#     """
#     An exception raised when attempting to double a method with arguments that do not match the
#     signature of the real method.
#     """
# 
#     pass
# 
# class VerifyingBuiltinDoubleArgumentError(VerifyingDoubleArgumentError):
#     """
#     An exception raised when attempting to validate arguments of a builtin.
#     """
# 
#     pass
# 
# class VerifyingDoubleError(AssertionError):
#     """
#     An exception raised when attempting to double a method that does not exist on the real object.
#     """
# 
#     def __init__(self, method_name, doubled_obj):
#         """
#         :param str method_name: The name of the method to double.
#         :param object doubled_obj: The real object being doubled.
#         """
# 
#         self._method_name = method_name
#         self._doubled_obj = doubled_obj
#         self.args = (method_name, doubled_obj)
#         self.message = "Cannot double method '{}' of '{}'."
# 
#     def no_matching_method(self):
#         self.message = "Cannot double method '{}' because {} does not implement it."
# 
#         return self
# 
#     def not_callable(self):
#         self.message = "Cannot double method '{}' because it is not a callable attribute on {}."
# 
#         return self
# 
#     def requires_instance(self):
#         self.message = "Cannot double method '{}' because it is not callable directly on {}."
# 
#         return self
# 
#     def __str__(self):
#         return self.message.format(self._method_name, self._doubled_obj)


# Path: doubles/verification.py
import sys
from inspect import isbuiltin, getcallargs, isfunction, ismethod
from doubles.exceptions import (
    VerifyingDoubleArgumentError,
    VerifyingBuiltinDoubleArgumentError,
    VerifyingDoubleError,
)



ACCEPTS_ARGS = (list, tuple, set)
ACCEPTS_KWARGS = (dict,)


if sys.version_info >= (3, 0):
    def _get_func_object(func):
        return func.__func__
else:
    def _get_func_object(func):
        return func.im_func


def _is_python_function(func):
    if ismethod(func):

        func = _get_func_object(func)