Skip to content

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

Merged
merged 7 commits into from
Feb 27, 2020

Conversation

jbrockmendel
Copy link
Member

No description provided.

from pandas import MultiIndex, Timestamp, date_range


class TestGetLevelValues:
Copy link
Member

Choose a reason for hiding this comment

The 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

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry... pandas/tests/indexes/methods/test_get_level_values.py

Copy link
Member Author

Choose a reason for hiding this comment

The 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

Copy link
Member

Choose a reason for hiding this comment

The 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?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the index tests will be grouped by method instead of Index class

I have no plans to do that anytime soon

Copy link
Member

Choose a reason for hiding this comment

The 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.

assert df["Date"][0] == dates[0][0]
assert df["Forecasting"][0] == dates[0][1]

s = Series(arr["Date"])
Copy link
Member

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?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as an aside where will the Series and Frame tests go

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)

@simonjayhawkins simonjayhawkins added Clean Testing pandas testing functions or related to the test suite labels Feb 27, 2020
@simonjayhawkins simonjayhawkins added this to the 1.1 milestone Feb 27, 2020
Copy link
Member

@simonjayhawkins simonjayhawkins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @jbrockmendel

pandas/tests/frame/test_timezones.py, pandas/tests/series/test_timeseries.py and pandas/tests/series/test_timezones.py will eventually disappear?

@simonjayhawkins simonjayhawkins merged commit d5d6834 into pandas-dev:master Feb 27, 2020
@jbrockmendel
Copy link
Member Author

pandas/tests/frame/test_timezones.py, pandas/tests/series/test_timeseries.py and pandas/tests/series/test_timezones.py will eventually disappear?

Seems likely

@jbrockmendel jbrockmendel deleted the tst-ts branch February 27, 2020 20:05
roberthdevries pushed a commit to roberthdevries/pandas that referenced this pull request Mar 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Clean Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants