Skip to content

TST: Disallow pytest.xfail #38902

Closed
@rhshadrach

Description

@rhshadrach

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    CIContinuous IntegrationTestingpandas testing functions or related to the test suite

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions