Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
graingert opened this issue Jul 3, 2019 · 2 comments

Comments

Projects
None yet
2 participants
@graingert
Copy link
Contributor

commented Jul 3, 2019

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 ==============================
@graingert

This comment has been minimized.

Copy link
Contributor Author

commented Jul 3, 2019

I expected stepwise to stop after the first XPASS(strict) failure

@nicoddemus

This comment has been minimized.

Copy link
Member

commented Jul 4, 2019

Indeed it seems it is not handling xpass(strict) failures. 👍

nicoddemus added a commit to nicoddemus/pytest that referenced this issue Jul 4, 2019

nicoddemus added a commit to nicoddemus/pytest that referenced this issue Jul 4, 2019

nicoddemus added a commit to nicoddemus/pytest that referenced this issue Jul 4, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.