def inject_fixture(request, arg, value):
    fd = python.FixtureDef(
        fixturemanager=request._fixturemanager,
        baseid=None,
        argname=arg,
        func=lambda: value,
        scope="function",
        params=None,
        yieldctx=False,
    )
    fd.cached_result = (value, 0, None)

    old_fd = getattr(request, "_fixturedefs", {}).get(arg)
    old_value = request._funcargs.get(arg)
    add_fixturename = arg not in request.fixturenames

    def fin():
        request._fixturemanager._arg2fixturedefs[arg].remove(fd)
        getattr(request, "_fixturedefs", {})[arg] = old_fd
        request._funcargs[arg] = old_value
        if add_fixturename:
            request.fixturenames.remove(arg)

    request.addfinalizer(fin)

    # inject fixture definition
    request._fixturemanager._arg2fixturedefs.setdefault(arg, []).insert(0, fd)
    # inject fixture value in request cache
    getattr(request, "_fixturedefs", {})[arg] = fd
    request._funcargs[arg] = value
    if add_fixturename:
        request.fixturenames.append(arg)
Returns True if an object is iterable and not a string or ProxyUnicode type, otherwise returns False.
dataset/ETHPy150Open pytest-dev/pytest-bdd/pytest_bdd/steps.py/inject_fixture--crossover with--dataset/ETHPy150Open CountZer0/PipelineConstructionSet/python/maya/site-packages/pymel-1.0.3/pymel/util/arguments.py/isIterable