def get_fixture_or_param_value(request, fixture_or_param_name):
    """
    Returns the value associated with parameter or fixture named `fixture_name`, in provided request context.
    This is just an easy way to use `getfixturevalue` or `getfuncargvalue` according to whichever is available in
    current pytest version.

    Note: it seems that this is the same than `request.node.callspec.params[fixture_or_param_name]` but maybe it is
    less 'internal' as an api ?

    :param request:
    :param fixture_or_param_name:
    :return:
    """
    try:
        return request.getfixturevalue(fixture_or_param_name)
    except AttributeError:
        return request.getfuncargvalue(fixture_or_param_name)
