Skip to content
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

Fixturize tests/frame/test_axis_select_reindex.py #25627

Merged
merged 7 commits into from
Jun 28, 2019
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions pandas/tests/frame/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,14 @@ def timezone_frame():
return df


@pytest.fixture
def datetime_series():
"""
Copy link
Contributor

Choose a reason for hiding this comment

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

this fixture itself is not very useful, however, possibly a fixture that is a float_frame but uses this an index might be

Copy link
Member

Choose a reason for hiding this comment

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

Yea I would agree with this comment. It also seems strange to put a fixture in this conftest which returns a series, as that could either create duplication or friction with the conftest for the series directory.

Any way to do what @jreback suggests above here?

Copy link
Contributor Author

@h-vetinari h-vetinari Mar 19, 2019

Choose a reason for hiding this comment

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

@h-vetinari: @jreback Can't do 3 things at the same time reasonably.
You're already requesting to do fixturization and renaming at the same time, let's keep the reorg for later. Also, case in point about the necessity of (some of) the fixtures re-added here: #25635

@jreback: +1 on reorg of fixtures later

@WillAyd, of course both of you are right. But the quasi-fixtures from tests.frame.common.TestData that are supposed to be translated already have this (as self.ts1).

I guess I should have pushed back harder against #24885, because datetime_series was already in tests.frame.conftest (since #22236) precisely for this translation. There's a limit to how many balls any one PR should have up in the air, and fixturization plus renaming is more than enough IMO.

Fixture for Series of floats with DatetimeIndex
"""
return tm.makeTimeSeries(nper=30)


@pytest.fixture
def simple_frame():
"""
Expand Down
Loading