harbor run -t swe-bench/pytest-dev__pytest-7432
harbor download swe-bench/pytest-dev__pytest-7432
skipping: --runxfail breaks pytest.mark.skip location reporting pytest versions: 5.4.x, current master
When @pytest.mark.skip/skipif marks are used to skip a test, for example
@pytest.mark.skip
skipif
import pytest @pytest.mark.skip def test_skip_location() -> None: assert 0
the expected skip location reported should point to the item itself, and this is indeed what happens when running with pytest -rs:
pytest -rs
SKIPPED [1] test_it.py:3: unconditional skip
However, adding pytest -rs --runxfail breaks this:
pytest -rs --runxfail
SKIPPED [1] src/_pytest/skipping.py:238: unconditional skip
The --runxfail is only about xfail and should not affect this at all.
--runxfail
Hint: the bug is in src/_pytest/skipping.py, the pytest_runtest_makereport hook.
src/_pytest/skipping.py
pytest_runtest_makereport