Skip to content

REF: organize DataFrame tests for indexing, by-method #31558

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 10 commits into from
Feb 2, 2020

Conversation

jbrockmendel
Copy link
Member

The only change that isnt just rearrangement is implementing where_frame fixture in test_where and using it to get rid of for-loops inside a bunch of tests in that file

@jreback jreback added Indexing Related to indexing on series/frames, not to indexes themselves Refactor Internal refactoring of code Testing pandas testing functions or related to the test suite labels Feb 2, 2020
@jreback jreback added this to the 1.1 milestone Feb 2, 2020
)
@pytest.fixture(params=["default", "float_string", "mixed_float", "mixed_int"])
def where_frame(request, float_string_frame, mixed_float_frame, mixed_int_frame):
if request.param == "default":
Copy link
Contributor

Choose a reason for hiding this comment

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

in future can add a doc-string (as the fixtures show this when showing the fixtures in pytest)



class TestXS:
def test_xs(self, float_frame, datetime_frame):
Copy link
Contributor

Choose a reason for hiding this comment

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

no big deal, but happy to have no classes if this is a specific test file (like you have it now).

Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

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

lgtm. some follown comments. ping on green.

@jbrockmendel
Copy link
Member Author

ping

@jreback jreback merged commit f0f058f into pandas-dev:master Feb 2, 2020
@jreback
Copy link
Contributor

jreback commented Feb 2, 2020

thanks!

@jbrockmendel jbrockmendel deleted the ref-frame-indexing branch February 2, 2020 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Indexing Related to indexing on series/frames, not to indexes themselves Refactor Internal refactoring of code 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