-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
CLN: Remove redundant index test from tests/base/test_ops.py #32484
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
CLN: Remove redundant index test from tests/base/test_ops.py #32484
Conversation
5af92b6
to
3d93ec0
Compare
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.
On board with cleaning up, but are we not losing any coverage here? Maybe overlooking, but one that sticks out is indexing with an Index object which appears here but I think not in the test you linked to replace this?
Good point @WillAyd, I'll check that later. I was assuming that if we lose coverage, then I'd get a codecov warning here in the PR. Isn't there a bot for these sort of things? |
We do have codecov but it’s not generally very insightful (at least for us)
…Sent from my iPhone
On Mar 7, 2020, at 1:24 AM, Martin Winkel ***@***.***> wrote:
Good point @WillAyd, I'll check that later. I was assuming that if we lose coverage, then I'd get a codecov warning here in the PR. Isn't there a bot for these sort of things?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
msg = "iLocation based boolean indexing cannot use an indexable as a mask" | ||
expectation = pytest.raises(ValueError, match=msg) | ||
else: | ||
expectation = do_not_raise() |
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.
inspired by pytest-dev/pytest#1830
@WillAyd I think this is ready for another review now. I added an |
This reverts commit 3b4c786.
@@ -7,6 +7,7 @@ | |||
@pytest.mark.parametrize( | |||
"values, dtype", | |||
[ | |||
([], "object"), |
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.
The empty scenario was previously covered with some redundant code in the bottom of the test. I moved it to the parametrization instead and adjusted the generic test code to handle it properly
looks ok, will have to look again after @WillAyd comments are addressed. |
thanks @SaturnFromTitan |
part of #23877
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff
Boolean indexing is already thoroughly tested in
test_series_mask_boolean
intests/indexes/test_na_indexing.py
- see here