fix: sabotage check treats failed scenario steps as INVALID

StepFailed is no AssertionError any more; sabotage.py counts a JUnit failure
named StepFailed as error, so an expected-red test only counts when its own
assertion fails.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Tobias KaupatandClaude Sonnet 5.5 committed 2026-10-20 10:06:04 +02:00
1 parent 9be33e3c26
commit cb35fb296d
2 files changed
+24 -5

No files matched your search

+6 -2
View File
@@ -41,8 +41,12 @@ def raise_interrupt(signum: int, _frame: object) -> None:
raise KeyboardInterrupt(f"received {signal.Signals(signum).name}")
class StepFailed(AssertionError):
pass
class StepFailed(Exception):
"""A scenario step could not run; not an assertion about the behaviour under test.
Deliberately no AssertionError: sabotage.py tells it apart from a real assertion
failure by the exception name in the JUnit report.
"""
class Scenario: