*** Settings ***
Documentation    Fixture: a tdd_expected_fail test whose setup fails.
...              Used by helper_tdd_tag_validation.py to verify the
...              setup/teardown error guard — the listener should NOT
...              invert this failure because the test body never executed.
...              This file must NOT be picked up by the main pabot runner --
...              it is excluded via the tdd_fixture tag.

*** Keywords ***
Failing Setup Keyword
    [Documentation]    Simulates an infrastructure setup failure.
    Fail    Setup failed: database connection unavailable

*** Test Cases ***
Bug 996 Setup Error Should Not Be Inverted
    [Tags]    tdd_issue    tdd_issue_996    tdd_expected_fail    tdd_fixture
    [Documentation]    This test has a failing setup. The listener should
    ...    detect the setup failure and skip inversion — the FAIL result
    ...    should be preserved as-is.
    [Setup]    Failing Setup Keyword
    Log    This should not execute because setup failed.
