Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Tests with failing setup fixture should get the "Error" status

Open
#782 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
testing-qa

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.

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
Dominant language
Python
Stars
1.5k
Forks
252
Avg merge
2h 8m
Merged PRs (30d)
5

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from pytest-dev/pytest-bdd

All issues in pytest-dev/pytest-bdd

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.