-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
REF: collect+parametrize reorder_levels tests #32373
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
REF: collect+parametrize reorder_levels tests #32373
Conversation
|
||
# no change, position | ||
result = obj.reorder_levels([0, 1, 2]) | ||
tm.assert_equal(obj, result) |
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.
if this is going to happen a lot with these changes, should maybe consider a solution that can maintain the correct assertion helper.
either in the parameterisation as "klass, helper" or create a fixture something like
@fixture()
def assert_klass_equal(klass):
if isinstance(klass, DataFrame):
return tm.assert_frame_equal
elif isinstance(klass, Series):
return tm.assert_series_equal
else:
assert False
(code not tested!)
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.
might make sense to add as a kwarg to tm.assert_equal
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.
yeah, that sounds good as well. could be follow-up
Thanks @jbrockmendel |
No description provided.