pytest-dev / pytest-dev/pytest-bdd
Async Step Definitions
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.5k
- Forks
- 251
- Avg merge
- 43m
- Merged PRs (30d)
- 2
Description
is there away to use async step definitions with pytest-bdd ?
For a step definition like:
@when('i send cucumbers ')
async def i_send_cucumbers(loop):
pass
I see the warning:
pytest_bdd/scenario.py:137: RuntimeWarning: coroutine 'i_send_cucumbers' was never awaited
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at pytest_bdd/scenario.py:137 and reproduce the RuntimeWarning with the async step definition shown in the issue. Trace how step functions are invoked and determine the project’s expected handling for coroutine steps. Done means async step definitions execute without the coroutine-never-awaited warning and existing synchronous steps remain supported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100