def is_class_or_module()

in doubles/target.py [0:0]


    def is_class_or_module(self):
        """Determines if the object is a class or a module

        :return: True if the object is a class or a module, False otherwise.
        :rtype: bool
        """

        if isinstance(self.obj, ObjectDouble):
            return self.obj.is_class

        return isclass(self.doubled_obj) or ismodule(self.doubled_obj)