Pytest: show extra test summmary info with -r



pytest -rx  - xfail, expected to fail
pytest -rs  - skipped
pytest -ra  - all the special cases


examples/pytest/test_r.py
import pytest

def test_pass():
    assert True

def test_fail():
    assert False

@pytest.mark.skip(reason="Unconditional skip")
def test_with_skip():
    assert True

@pytest.mark.skipif(True, reason="Conditional skip")
def test_with_skipif():
    assert True

@pytest.mark.skipif(False, reason="Conditional skip")
def test_with_skipif_but_run():
    assert True


@pytest.mark.xfail(reason = "Expect to fail and failed")
def test_with_xfail_and_fail():
   assert False

@pytest.mark.xfail(reason = "Expect to fail but passed")
def test_with_xfail_but_pass():
   assert True

pytest -h