You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the existing issues and didn't find my feature already requested there
Feature description
Pytest allows to retrieve a fixture value by injecting the fixture as a function argument or by using request.getfixturevalue(). The latter fails to provide the value of an async fixture.
According to the docs [1], getfixturevalue() runs a fixture dynamically. This feature is not available in anyio currently for async fixtures. However, I would like to make use of it to decide if I need to run a specific fixture based on the value of another fixture.
From the docs:
Dynamically run a named fixture function.
Declaring fixtures via function argument is recommended where possible. But if you can only decide whether to use another > fixture at test setup time, you may use this function to retrieve it inside a fixture or test function body.
Things to check first
Feature description
Pytest allows to retrieve a fixture value by injecting the fixture as a function argument or by using
request.getfixturevalue()
. The latter fails to provide the value of an async fixture.Use case
According to the docs [1],
getfixturevalue()
runs a fixture dynamically. This feature is not available in anyio currently for async fixtures. However, I would like to make use of it to decide if I need to run a specific fixture based on the value of another fixture.From the docs:
[1] https://docs.pytest.org/en/7.1.x/reference/reference.html
The text was updated successfully, but these errors were encountered: