diff --git a/src/pytest_bdd/scenario.py b/src/pytest_bdd/scenario.py index 531190617..4398722e2 100644 --- a/src/pytest_bdd/scenario.py +++ b/src/pytest_bdd/scenario.py @@ -247,7 +247,7 @@ def _execute_step_function( # so that we can allow "yield" statements in it return_value = call_fixture_func(fixturefunc=context.step_func, request=request, kwargs=kwargs) - except Exception as exception: + except BaseException as exception: request.config.hook.pytest_bdd_step_error(exception=exception, **kw) raise