Skip to content

TST: parametrize tests.indexing.test_float #31855

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 15, 2020

Conversation

jbrockmendel
Copy link
Member

Working on making our exception-raising more consistent, getting these tests cleaned up will make that easier.

Copy link
Member

@WillAyd WillAyd left a comment

Choose a reason for hiding this comment

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

cool looks good. I know this will take a few passes so fine to merge this if it helps continue along

@@ -70,97 +80,107 @@ def test_scalar_error(self, index_func):
tm.makePeriodIndex,
],
)
def test_scalar_non_numeric(self, index_func):
@pytest.mark.parametrize("klass", [Series, DataFrame])
Copy link
Member

Choose a reason for hiding this comment

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

Could be a logical follow up to make a frame_or_series fixture (we already have index_or_series in conftest) as used elsewhere for sure


f(lambda x: x.loc)
# setitem
for l in [slice(3.0, 4), slice(3, 4.0), slice(3.0, 4.0)]:
Copy link
Member

Choose a reason for hiding this comment

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

Possible to parametrize this since done in other tests? Maybe need to split off?

Copy link
Member Author

Choose a reason for hiding this comment

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

this will need to be split off in a couple of places, will do in a separate pass

@WillAyd WillAyd added the Testing pandas testing functions or related to the test suite label Feb 11, 2020
@WillAyd WillAyd added this to the 1.1 milestone Feb 12, 2020
Copy link
Member

@WillAyd WillAyd left a comment

Choose a reason for hiding this comment

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

lgtm

@jbrockmendel
Copy link
Member Author

@jreback gentle ping; lots of PRs are touching this file and it is particularly hard to rebase

@@ -5,6 +5,16 @@
import pandas._testing as tm


def gen_obj(klass, index):
Copy link
Contributor

Choose a reason for hiding this comment

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

ok, should be turned into a fixture at some point (but understand for now)

@jreback jreback merged commit bead1c3 into pandas-dev:master Feb 15, 2020
@jbrockmendel jbrockmendel deleted the tst-floats branch February 15, 2020 01:53
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
Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants