POC/TST: dynamic xfail
Motivation: we have a non-trivial number of places where we do `pytest.xfail` within a test (as opposed to via decorator).  This has the downside of always being non-strict, so incorrectly-xfailed tests will never show up as xpassing.

This uses a workaround to dynamically add the pytest.mark.xfail marker within the test rather than raising pytest.xfail directly.

Thoughts?
Nice! wasn't aware of this - came in handy in https://github.com/pandas-dev/pandas/pull/30544 Do we want to do this across the codebase? - I can create an issue if so > Do we want to do this across the codebase? - I can create an issue if so

sure, should create a convenience function to do this, put in _test_decorators thanks