Skip to content

[FR] Integrate xfail #33

Closed
Closed
@webknjaz

Description

@webknjaz

I have a test that SEGFAULTs under random envs (usually only in one or two jobs in the matrix). So I decided to use forked to isolate it and marked it with xfail as follows:

@pytest.mark.xfail(
    reason='This test causes SEGFAULT, flakily.',
    strict=False,
)
@pytest.mark.forked
def test_exec_command(ssh_channel):
    """Test getting the output of a remotely executed command."""
    ...

But, despite my expectations, when it crashes, pytest shows it as a failure and not as XFAIL.

Could you please clarify whether this behavior is intended or is it a bug? (looks like a bug to me)

Am I doing anything wrong? Am I missing something here?

(Ref: https://github.com/ansible/pylibssh/runs/728770734?check_suite_focus=true#step:9:120)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions