pytest-dev / pytest-dev/pytest-bdd
Tests with failing setup fixture should get the "Error" status
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.5k
- Forks
- 251
- Avg merge
- 43m
- Merged PRs (30d)
- 2
Description
Describe the bug
If a setup fixture fails, the test gets the Failed status.
It should get the Error status
To Reproduce
import pytest
from pytest_bdd import scenarios, given, when, then, parsers
scenarios('features/test.feature')
@pytest.fixture(scope="module")
def setup():
assert False
yield
@given('I want a test with setup fixture')
def step_impl(setup):
pass
Actual behavior
The test gets the Failed status
Expected behavior
The test gets the Error status
Version
- pytest version: 8.4.1
- pytest-bdd version: 8.1.0
- OS: Ubuntu
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
Reproduce the pytest-bdd example using features/test.feature and the stated pytest and pytest-bdd versions. Trace how a failing setup fixture is classified, then add a regression test for this case; done means the affected test receives the Error status instead of Failed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100