Skip to content

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

@harmin-parra

Description

@harmin-parra

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions