Skip to content

REF/TST: misplaced tests in tests.indexes.period #31758

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 6 commits into from
Feb 9, 2020

Conversation

jbrockmendel
Copy link
Member

No description provided.

@jreback jreback added Period Period data type Testing pandas testing functions or related to the test suite labels Feb 6, 2020
@jreback jreback added this to the 1.1 milestone Feb 6, 2020

exp = DatetimeIndex(["2011-01-01", "2011-02-01", "2011-03-01"], tz="US/Eastern")
res = pi.astype("datetime64[ns, US/Eastern]")
tm.assert_index_equal(pi.astype("datetime64[ns, US/Eastern]"), exp)
Copy link
Contributor

Choose a reason for hiding this comment

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

the res here is duplicated
also can you have the others use res= rather than doing it in the comparator

tm.assert_index_equal(pd.Index(arr), pd.PeriodIndex(arr))
tm.assert_index_equal(pd.Index(np.array(arr)), pd.PeriodIndex(np.array(arr)))
arr = [Period("2011-01", freq="M"), NaT, Period("2011-03", freq="M")]
tm.assert_index_equal(Index(arr), PeriodIndex(arr))
Copy link
Contributor

Choose a reason for hiding this comment

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

ideally make these
res =
exp =

Copy link
Member Author

Choose a reason for hiding this comment

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

agreed. per request from @WillAyd, trying to keep pure-moves separate from other cleanups. dont worry, there's plenty more index test organization on its way

@jreback jreback merged commit a8817ba into pandas-dev:master Feb 9, 2020
@jbrockmendel jbrockmendel deleted the misplaced-pi-tests branch February 9, 2020 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Period Period data type 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