allure-framework / allure-python

Allure integrations for Python test frameworks
https://allurereport.org/
Apache License 2.0
727 stars 237 forks source link

Mark high level step as failed if low level step with soft check failed #827

Open provider161 opened 2 months ago

provider161 commented 2 months ago

I'm submitting a ...

What is the current behavior?

If there is a low level step with failed soft check, high level step marked green.

Code:

from pytest_check import check as soft_check
from allure import step

def test_soft_checks():

    with step("High level step"):

        with soft_check, step("1st low level step"):

            assert False

        with soft_check, step("2nd low level step"):

            assert True

What we got in report:

high level step is green

Снимок экрана 2024-09-12 в 17 07 25

What is the expected behavior?

high level step is red

Please tell us about your environment: