pook/mock.py
def error(self, error):
        """
        Defines a simulated exception error that will be raised.

        Arguments:
            error (str|Exception): error to raise.

        Returns:
            self: current Mock instance.
        """
        self._error = RuntimeError(error) if isinstance(error, str) else error
def error(self, error):
        self._error = RuntimeError(error) if isinstance(error, str) else error
def error ( self , error ) : self . _error = RuntimeError ( error ) if isinstance ( error , str ) else error
Defines a simulated exception error that will be raised.

        Arguments:
            error (str|Exception): error to raise.

        Returns:
            self: current Mock instance.
Defines a simulated exception error that will be raised .