-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
TST: Fix 36 maybe_promote xfails wanting np.bytes_ instead of np.object_ #28861
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
Conversation
we should never have bytes as these are not a pandas supported dtype; anything that is not a standard (str, int, float, m8, M8 etc, or EA dtype) would just promote to object bytes are not special in that regard |
agreed, that matches what this PR does. The xfailed tests that this fixes do not match what you said |
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.
lgtm @jreback
else: | ||
pytest.xfail("wrong missing value marker") | ||
else: | ||
if not issubclass(dtype.type, np.bytes_): |
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.
could enhance / make new test that uses an object here (e.g. list / tuple), IOW something that is treated similarly but is not also a numpy dtype. (future PR)
thanks |
@jreback less trivial than some of the others. These changes are based on my understanding that maybe_promote should never be returning np.bytes_ dtype; those cases all become np.object_. That is what maybe_promote currently does, and this updates the tests to expect that behavior.