-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
TST: Adding unit tests for named indexes resulting from empty datafra… #43593
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
Hello @IamJasonBian! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2021-10-31 04:18:30 UTC |
import numpy as np | ||
import pytest | ||
|
||
from pandas import ( |
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.
pls don't make a new file, look for a similar test in this directory and put it near.
|
||
import pandas._testing as tm | ||
|
||
def test_empty_shift_with_fill(): |
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.
referencde the original issue in a comment
|
||
tm.assert_frame_equal(shifted, shifted_with_fill) | ||
tm.assert_index_equal(shifted.index, shifted_with_fill.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.
looks like you can parameterize some of these
|
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.
pls merge master and ping on green
@@ -113,3 +113,33 @@ def test_group_diff_object_raises(object_dtype): | |||
) | |||
with pytest.raises(TypeError, match=r"unsupported operand type\(s\) for -"): | |||
df.groupby("a")["b"].diff() | |||
|
|||
@pytest.mark.parametrize( |
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.
since this is just a single test no need to parameterize (e.g. just create it inside the test)
Removed Parameterization
@jreback, ok to push? Not sure why pre-commit black is failing and PEP8 linter passed locally. |
no if precommit is failing then there is a problem |
Tests are now PEP8 compliant
@jreback pinging on green |
@IamJasonBian could you merge master one more time? Will merge after all green again |
thanks @IamJasonBian |
…me shifts
Tests added for issue: #41264