Skip to content

pytest stepwise doesn't work with xfail strict failures #5547

@graingert

Description

@graingert
graingert@onomastic:~/projects/foo$ cat tests/test_foo.py 
import pytest


@pytest.mark.xfail(reason="pass")
def test_a():
    pass


@pytest.mark.xfail(reason="pass")
def test_b():
    pass
graingert@onomastic:~/projects/foo$ cat tests/pytest.ini 
[pytest]
addopts = --strict
xfail_strict=true
graingert@onomastic:~/projects/foo$ pytest --sw tests/
================================ test session starts ================================
platform linux -- Python 3.7.3, pytest-5.0.0, py-1.8.0, pluggy-0.12.0
rootdir: /home/graingert/projects/foo/tests, inifile: pytest.ini
collected 2 items                                                                   
stepwise: no previously failed tests, not skipping.

tests/test_foo.py FF                                                          [100%]

===================================== FAILURES ======================================
______________________________________ test_a _______________________________________
[XPASS(strict)] pass
______________________________________ test_b _______________________________________
[XPASS(strict)] pass
============================= 2 failed in 0.01 seconds ==============================

Metadata

Metadata

Assignees

No one assigned

    Labels

    plugin: cacherelated to the cache builtin plugintype: bugproblem that needs to be addressed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions