def test_strict_sanity(self, pytester: Pytester) -> None:
        """Sanity check for xfail(strict=True): a failing test should behave
        exactly like a normal xfail."""
        p = pytester.makepyfile(
            """
            import pytest
            @pytest.mark.xfail(reason='unsupported feature', strict=True)
            def test_foo():
                assert 0
        """
        )
        result = pytester.runpytest(p, "-rxX")
        result.stdout.fnmatch_lines(["*XFAIL*unsupported feature*"])
        assert result.ret == 0
Sanity check for xfail(strict=True): a failing test should behave
        exactly like a normal xfail.
testing/test_skipping.py