-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
CLN/REF: Split up / clean Categorical constructor tests #32211
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
dtype = CategoricalDtype(categories=["a", "b", "c"]) | ||
|
||
# empty codes should not raise for floats | ||
Categorical.from_codes([], dtype.categories) |
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.
did this get lost or moved?
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.
I had removed that because it seemed duplicative given that we have a test_constructor_empty
test. Looking now I see that it isn't using from_codes
so I can add another test for that specifically.
dtype = CategoricalDtype(categories=["a", "b", "c"]) | ||
|
||
# empty codes should not raise for floats |
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.
can you retain this comment and the one on L552 describing the choice of parametrizations
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.
Do you mean the inline comments from L540 and L552? This comment (L543) I find a little confusing because we're testing an empty list rather than an empty float array
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.
thanks
LGTM pending green (the failure is unrelated, but id rather be patient all the same) |
@jbrockmendel Looks like we're green after fixing CI, thanks for the review |
thanks @dsaxton |
…2211) * Split / parametrize * Dedupe some code * Parametrize * Add back from_codes for empty * Add comment
No description provided.