def satisfy_exact_match()

in doubles/allowance.py [0:0]


    def satisfy_exact_match(self, args, kwargs):
        """Returns a boolean indicating whether or not the stub will accept the provided arguments.

        :return: Whether or not the stub accepts the provided arguments.
        :rtype: bool
        """

        if self.args is None and self.kwargs is None:
            return False
        elif self.args is _any and self.kwargs is _any:
            return True
        elif args == self.args and kwargs == self.kwargs:
            return True
        elif len(args) != len(self.args) or len(kwargs) != len(self.kwargs):
            return False

        if not all(x == y or y == x for x, y in zip(args, self.args)):
            return False

        for key, value in self.kwargs.items():
            if key not in kwargs:
                return False
            elif not (kwargs[key] == value or value == kwargs[key]):
                return False

        return True