Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TST: Disallow pytest.xfail #38902

Closed
9 of 11 tasks
rhshadrach opened this issue Jan 2, 2021 · 0 comments · Fixed by #39624
Closed
9 of 11 tasks

TST: Disallow pytest.xfail #38902

rhshadrach opened this issue Jan 2, 2021 · 0 comments · Fixed by #39624
Labels
CI Continuous Integration Testing pandas testing functions or related to the test suite
Milestone

Comments

@rhshadrach
Copy link
Member

rhshadrach commented Jan 2, 2021

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
@rhshadrach rhshadrach added Bug Needs Triage Issue that has not been reviewed by a pandas team member Testing pandas testing functions or related to the test suite and removed Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Jan 2, 2021
@rhshadrach rhshadrach mentioned this issue Jan 2, 2021
5 tasks
@rhshadrach rhshadrach added this to the Contributions Welcome milestone Jan 3, 2021
This was referenced Jan 3, 2021
@rhshadrach rhshadrach added the CI Continuous Integration label Feb 6, 2021
@jreback jreback modified the milestones: Contributions Welcome, 1.3 Feb 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Continuous Integration Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants