-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
TST: Refactor test_expressions.py #44778
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.
cc @jbrockmendel if any comments
pandas/tests/test_expressions.py
Outdated
@@ -134,8 +115,31 @@ def run_frame(self, df, other, flex: bool): | |||
], | |||
) | |||
@pytest.mark.parametrize("flex", [True, False]) | |||
def test_arithmetic(self, df, flex): | |||
self.run_frame(df, df, flex) | |||
@pytest.mark.parametrize("arith", ["gt", "lt", "ge", "le", "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.
we have a fixture for this
pandas/tests/test_expressions.py
Outdated
@@ -344,18 +348,18 @@ def test_bool_ops_column_name_dtype(self, test_input, expected): | |||
result = test_input.loc[:, ["a", "dtype"]].ne(test_input.loc[:, ["a", "dtype"]]) | |||
tm.assert_frame_equal(result, expected) | |||
|
|||
@pytest.mark.parametrize("df", [_frame]) |
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.
just define df = _frame'
inside?
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
Enable more
pytest.mark.parametrize