Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pytest_bdd_after_scenario has scenario status PASSED even if it failed #585

Open
dmitriykow7 opened this issue Nov 21, 2022 · 1 comment

Comments

@dmitriykow7
Copy link

Fixtrue pytest_bdd_after_scenario(scenario: Scenario):
All steps and scenarios has status failed=False, however test failed

and pytest_bdd_step_error fixture worked correct
image

[gw0] [ 25%] FAILED ui_steps/test_reports_steps.py::test_deselect_facility_daily_risk_report[chromium] <- venv/lib/python3.9/site-packages/pytest_bdd/scenario.py ##teamcity[testFailed timestamp='2022-11-21T12:32:51.881' details='cls = <class |'_pytest.runner.CallInfo|'>|nfunc = <function call_runtest_hook.. at 0x107211c10>|nwhen = |'call|'|nreraise = (<class |'_pytest.outcomes.Exit|'>, <class |'KeyboardInterrupt|'>)|n|n @classmethod|n def from_call(|n cls,|n func: "Callable|[|[|], TResult|]",|n when: "Literal|[|'collect|', |'setup|', |'call|', |'teardown|'|]",|n reraise: Optional|[|n Union|[Type|[BaseException|], Tuple|[Type|[BaseException|], ...|]|]|n |] = None,|n ) -> "CallInfo|[TResult|]":|n """Call func, wrapping the result in a CallInfo.|n |n :param func:|n The function to call. Called without arguments.|n :param when:|n The phase in which the function is called.|n :param reraise:|n Exception or exceptions that shall propagate if raised by the|n function, instead of being wrapped in the CallInfo.|n """|n excinfo = None|n start = timing.time()|n precise_start = timing.perf_counter()|n try:|n> result: Optional|[TResult|] = fu

@david-m-globant
Copy link

I have the same problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants