-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
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
Conversation
There was a problem hiding this 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]) |
There was a problem hiding this comment.
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)]: |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
@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): |
There was a problem hiding this comment.
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)
Working on making our exception-raising more consistent, getting these tests cleaned up will make that easier.