tests/lib/decorator.py
def log_function_runner(fn):
        ''' Base decorator. Decorates the underlying function. '''

        desc = get_desc(fn)

        @functools.wraps(fn)
        def log_function_run(*args, **kwargs):
            with LoggingContext(logger=logger, desc=desc):
                if include_args and include_kwargs:
                    logger.debug('args, kwargs: %r, %r', args, kwargs)
                elif include_args:
                    logger.debug('args: %r', args)
                elif include_kwargs:
                    logger.debug('kwargs: %r', kwargs)

                result = fn(*args, **kwargs)

                if include_return:
                    logger.debug('return: %r', result)

                return result

        return log_function_run
 Base decorator. Decorates the underlying function. 
Base decorator. Decorates the underlying function.
Base decorator . Decorates the underlying function .
def log_function_runner(fn):
        desc = get_desc(fn)
        @functools.wraps(fn)
        def log_function_run(*args, **kwargs):
            with LoggingContext(logger=logger, desc=desc):
                if include_args and include_kwargs:
                    logger.debug('args, kwargs: %r, %r', args, kwargs)
                elif include_args:
                    logger.debug('args: %r', args)
                elif include_kwargs:
                    logger.debug('kwargs: %r', kwargs)
                result = fn(*args, **kwargs)
                if include_return:
                    logger.debug('return: %r', result)
                return result
        return log_function_run
def log_function_runner ( fn ) : desc = get_desc ( fn ) @ functools . wraps ( fn ) def log_function_run ( * args , ** kwargs ) : with LoggingContext ( logger = logger , desc = desc ) : if include_args and include_kwargs : logger . debug ( 'args, kwargs: %r, %r' , args , kwargs ) elif include_args : logger . debug ( 'args: %r' , args ) elif include_kwargs : logger . debug ( 'kwargs: %r' , kwargs ) result = fn ( * args , ** kwargs ) if include_return : logger . debug ( 'return: %r' , result ) return result return log_function_run
Base decorator.
Base decorator .
''' Base decorator. Decorates the underlying function. '''
fn