import functools


def _fix(param_name, fixture, func):
    """
    Decorates `func` to inject the `fixture` callable result as `param_name`.
    """
    @functools.wraps(func)
    def wrapper(*args, **kwargs):
        kwargs[param_name] = fixture()
        return func(*args, **kwargs)

    return wrapper