pytest-dev/pytest
Expose FixtureFunctionDefinition as part of the public API
オープン
#14,853 opened on 2026/08/11
good first issuetopic: fixtures
Repository metrics
- Stars
- (11,012 個のスター)
- PR merge metrics
- (平均マージ 4d 1h) (30d で 59 merged PRs)
説明
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