-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
TST: adds a test to check signedness preservation after sum #57306
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
TST: adds a test to check signedness preservation after sum #57306
Conversation
def test_signedness_preserved_after_sum(self): | ||
s = Series([1, 2, 3, 4]) | ||
|
||
result1 = s.astype("int8").sum().dtype |
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.
Don't need to test this one
s = Series([1, 2, 3, 4]) | ||
|
||
result1 = s.astype("int8").sum().dtype | ||
result2 = s.astype("uint8").sum().dtype |
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.
Can you assert the actual result of s.astype("uint8").sum()
?
def test_signedness_preserved_after_sum(self): | ||
s = Series([1, 2, 3, 4]) |
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.
def test_signedness_preserved_after_sum(self): | |
s = Series([1, 2, 3, 4]) | |
def test_signedness_preserved_after_sum(self): | |
# GH 37491 | |
ser = Series([1, 2, 3, 4]) |
I removed the unnecessary test and added the issue number :) |
Thanks @banorton |
…ev#57306) * add a test to check signedness preservation after sum * removed test for int8 and added issue number
Adds a test to make sure the result of sum does not alter the signedness of the input.