-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
CLN: Clean test_arithmetic.py #36390
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
@@ -553,68 +551,83 @@ def test_comparison_tuples(self): | |||
expected = Series([True, False]) | |||
tm.assert_series_equal(result, expected) | |||
|
|||
def test_comparison_operators_with_nas(self): | |||
@pytest.mark.parametrize("op", ["lt", "le", "gt", "ge", "eq", "ne"]) |
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.
I think these exist as dunder strings in the all_compare_operators
fixture
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.
thanks @dsaxton some comments, but happy to do in a followon.
@@ -271,7 +271,6 @@ def test_comparison_flex_basic(self): | |||
tm.assert_series_equal(left.gt(right), left > right) | |||
tm.assert_series_equal(left.ge(right), left >= right) | |||
|
|||
# axis | |||
for axis in [0, None, "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.
could parameterize here (might have to split the test)
@@ -280,7 +279,6 @@ def test_comparison_flex_basic(self): | |||
tm.assert_series_equal(left.gt(right, axis=axis), left > right) | |||
tm.assert_series_equal(left.ge(right, axis=axis), left >= right) | |||
|
|||
# | |||
msg = "No axis named 1 for object type" |
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 use the fixture
General cleaning (i.e., replacing for loops) trying to make these easier to follow / debug