-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
TST: tighten xfails #38309
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
Conversation
# 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: |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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)
No description provided.