Closed
Description
pytest.xfail will immediately stop a test, not checking if it would have otherwise succeeded. The request fixture can used to run a test and only pass if the test does indeed fail:
request.node.add_marker(pytest.mark.xfail(reason="..."))
- Remove all occurrences of
pytest.xfail
- Update docs
- Add pre-commit hook
PR #38901 handles many of the current occurrences. The remaining ones are in:
- indexes/test_common
- pandas/conftest
- indexes/test_setops
- indexing/test_coercion
- series/indexing/test_setitem
- series/test_arithmetic
- series/indexing/test_where
- tseries/offsets