Description
Can we add support to use the pytest.fixture name parameter, if defined? Currently, the fixture is displayed with the fixture's function name. However, as described by pytest:
Parameter name: This defaults to the name of the decorated function. If a fixture is used in the same module in which it is defined, the function name of the fixture will be shadowed by the function arg that requests the fixture; one way to resolve this is to name the decorated function fixture_ and then use @pytest.fixture(name='').
@pytest.fixture(name="myfixture", scope="session")
async def fixture_myfixture():
...
It could display the name either in the signature line, or at least if name is diff than the function name, display above Scope below the signature line?
Version
- Operating System:
- Python: 3.10
- sphinx-autofixture: 0.4.1
Description
Can we add support to use the pytest.fixture name parameter, if defined? Currently, the fixture is displayed with the fixture's function name. However, as described by
pytest:It could display the name either in the signature line, or at least if
nameis diff than the function name, display aboveScopebelow the signature line?Version