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: tighten xfails #38309

Merged
merged 2 commits into from
Dec 5, 2020
Merged

TST: tighten xfails #38309

merged 2 commits into from
Dec 5, 2020

Conversation

jbrockmendel
Copy link
Member

No description provided.

@jreback jreback added the Testing pandas testing functions or related to the test suite label Dec 5, 2020
@jreback jreback added this to the 1.2 milestone Dec 5, 2020
# test ufuncs of numpy, see:
# https://numpy.org/doc/stable/reference/ufuncs.html

if isinstance(index, (DatetimeIndex, TimedeltaIndex)):
if isinstance(index, DatetimeIndex) and index.tz is not None:
if func in [np.isfinite, np.isnan, np.isinf]:
pytest.xfail(reason="__array_ufunc__ is not defined")
if not np_version_under1p17:
Copy link
Contributor

@jreback jreback Dec 5, 2020

Choose a reason for hiding this comment

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

why do we not prefer an inside use of pytest.xfail and this format instead?

Copy link
Member Author

Choose a reason for hiding this comment

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

using pytest.xfail breaks out immediately, so you dont get alerted if the xfail has been fixed.

Copy link
Contributor

Choose a reason for hiding this comment

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

interesting; it doesn't react to strict=True?

Copy link
Member Author

Choose a reason for hiding this comment

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

AFAIK thats only when used as a decorator @pytest.mark.xfail(strict=foo)

Copy link
Contributor

Choose a reason for hiding this comment

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

kk

can u update the way to write tests in the docs (open an issue or PR)

also prob need to have a rule which prohibits (open an issue)

@jreback jreback merged commit 22dbef1 into pandas-dev:master Dec 5, 2020
@jbrockmendel jbrockmendel deleted the tst-xfails branch December 5, 2020 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants