python-pytest-cases icon indicating copy to clipboard operation
python-pytest-cases copied to clipboard

CHORE: create a util for pytest compatibility, to access underlying fixture callable

Open smarie opened this issue 5 months ago • 0 comments
trafficstars

In several tests we have this currently

    if PYTEST84_OR_GREATER:
        # See https://github.com/pytest-dev/pytest/pull/12473
        import inspect
        obj = inspect.unwrap(dummy)
    else:
        obj = dummy.__pytest_wrapped__.obj

it could probably be good to create a util function in common_pytest to perform this task : get_fixture_callable. THis would be easier for refactoring

smarie avatar Jun 09 '25 16:06 smarie