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
Currently, you must callpytest_twisted.async_fixture and pytest_twisted.async_yield_fixture, and (until #74 fixes it) the readme demonstrates no-call semantics. I propose allowing this form by mimicking pytest.fixtures's behavior, to improve consistency and UX.
It looks like pytest.fixture treats its first argument as either the fixture scope name if it's a str, and otherwise assumes it's the fixture function:
Currently, you must call
pytest_twisted.async_fixture
andpytest_twisted.async_yield_fixture
, and (until #74 fixes it) the readme demonstrates no-call semantics. I propose allowing this form by mimickingpytest.fixtures
's behavior, to improve consistency and UX.It looks like
pytest.fixture
treats its first argument as either the fixture scope name if it's astr
, and otherwise assumes it's the fixture function:https://github.com/pytest-dev/pytest/blob/fd1a51a23fa687cf344f3506dff6cde0166faf2c/src/_pytest/fixtures.py#L1029-L1068
At first glance, I think this is a reasonable approach, and should be relatively straightforward to implement.
The text was updated successfully, but these errors were encountered: