import subprocess
import sys


def test_skip_location_with_runxfail(tmp_path):
    p = tmp_path.joinpath("test_it.py")
    p.write_text("import pytest\n@pytest.mark.skip\ndef test_skip_location():\n    assert 0\n")
    proc = subprocess.run([sys.executable, "-m", "pytest", str(p), "-rs", "--runxfail"], cwd=str(tmp_path), stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True)
    out = proc.stdout + proc.stderr
    assert "test_it.py:3" in out
    assert "skipping.py" not in out
