pytest-dev/pytest
Expose FixtureFunctionDefinition as part of the public API
Aberta
#14.853 aberto em 11 de ago. de 2026
good first issuetopic: fixtures
Métricas do repositório
- Stars
- (11.012 estrelas)
- Métricas de merge de PR
- (Mesclagem média 4d 1h) (59 fundiu PRs em 30d)
Description
There doesn’t appear to be a public type that can be used to annotate the result of pytest.fixture.
For example, consider a factory which creates fixtures:
from _pytest.fixtures import FixtureFunctionDefinition
def make_fixture(value: str) -> FixtureFunctionDefinition:
@pytest.fixture
def fixture() -> str:
return value
return fixture