Another start at #223. It seems as though some of the previous cracks at it have stalled, and with there being some significant changes to the baseline overall since those were opened (notably implementing steps as fixtures), I don't think those look too salvageable in their current form. This provides wrappers for step functions when declared as async, the wrapping logic is pretty closely based on what pytest-asyncio does for their @async_fixture (but this does not add pytest-asyncio as a requirement).
Things that might want to be considered:
[ ] Strict mode - if is_async is set, then raise an error if the function is not async.
[ ] Optional interop with other plugins (e.g. pytest-asyncio, could just request the event_loop fixture if enabled/available).
Another start at #223. It seems as though some of the previous cracks at it have stalled, and with there being some significant changes to the baseline overall since those were opened (notably implementing steps as fixtures), I don't think those look too salvageable in their current form. This provides wrappers for step functions when declared as async, the wrapping logic is pretty closely based on what pytest-asyncio does for their
@async_fixture
(but this does not add pytest-asyncio as a requirement).Things that might want to be considered:
is_async
is set, then raise an error if the function is not async.event_loop
fixture if enabled/available).