Skip to content

POC/TST: dynamic xfail #30521

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

Merged
merged 1 commit into from
Dec 30, 2019
Merged

Conversation

jbrockmendel
Copy link
Member

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?

@gfyoung gfyoung added Enhancement Testing pandas testing functions or related to the test suite labels Dec 28, 2019
Copy link
Member

@gfyoung gfyoung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated docs failures notwithstanding, LGTM

@alimcmaster1
Copy link
Member

Nice! wasn't aware of this - came in handy in #30544

Copy link
Member

@alimcmaster1 alimcmaster1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@alimcmaster1
Copy link
Member

Do we want to do this across the codebase? - I can create an issue if so

@jreback jreback added this to the 1.0 milestone Dec 30, 2019
@jreback
Copy link
Contributor

jreback commented Dec 30, 2019

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

@jreback jreback merged commit 012b0bd into pandas-dev:master Dec 30, 2019
@jreback
Copy link
Contributor

jreback commented Dec 30, 2019

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants