-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
CLN: organize MultiIndex indexing tests #31863
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
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.
minor nits
pandas/tests/indexes/conftest.py
Outdated
import pytest | ||
|
||
import pandas._testing as tm | ||
from pandas.core.indexes.api import Index, MultiIndex | ||
|
||
|
||
def _gen_mi(): | ||
# a MultiIndex used to test the general functionality of the |
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 think "general functionality" is mistakenly repeated twice
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, will update
pandas/tests/indexes/conftest.py
Outdated
# general functionality of this object | ||
|
||
# See Also: tests.multi.conftest.idx | ||
major_axis = Index(["foo", "bar", "baz", "qux"]) |
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 alternately just construct the mi from tuples? I think would be more readable that way
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.
This is how it is constructd in the other conftest
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.
seems ok, but is there a reason to use the class based structure rather than simply splitting to modules? (and/or putting in existing modules)
e.g. TestSliceLocs we already have test_slice.py (haven't looked closely, but for example)
habit, mostly. for some stuff its nice to organize tests within a module |
thanks |
* implement test_take * move test_take, organize tests * cleanup * remove unused imports * isort fixup * typo fixup
No description provided.