-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
REF/TST: misplaced tests in test_timeseries, test_timezones #32300
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
Changes from all commits
4d9315d
baf9055
2ee811e
73b78fb
2d59a84
804237c
25fb91c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from pandas import MultiIndex, Timestamp, date_range | ||
|
||
|
||
class TestGetLevelValues: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This method is also on Index. should the module be just pandas/tests/indexes/test_get_level_values.py There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. sorry... pandas/tests/indexes/methods/test_get_level_values.py There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it exists on Index, but is really only relevant for MultiIndex i think There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I appreciate that, but I assume that this reorganization is to aid parametrisation. and that the index tests will be grouped by method instead of Index class? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I have no plans to do that anytime soon There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fair enough, I suppose that Series and Frame are still separate and that's only two classes. we'll see how the method based testing and parametrisation goes on those. |
||
def test_get_level_values_box_datetime64(self): | ||
|
||
dates = date_range("1/1/2000", periods=4) | ||
levels = [dates, [0, 1]] | ||
codes = [[0, 0, 1, 1, 2, 2, 3, 3], [0, 1, 0, 1, 0, 1, 0, 1]] | ||
|
||
index = MultiIndex(levels=levels, codes=codes) | ||
|
||
assert isinstance(index.get_level_values(0)[0], Timestamp) |
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.
maybe add a TODO for spliting out the Series test or parameterising.
as an aside where will the Series and Frame tests go. does this need to move again?
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.
For tests like this that are mostly testing Frame with a little bit of Series test on the side, it'll probably stay mixed for the foreseeable future. For tests where we can share/parametrize tests between Series/Frame, maybe tests.generic? (though the tests currently in that directory are not in great shape)