-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
CLN: Replace DataFrame() with empty_frame in tests #33167
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 @Jason-M-Chan! 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 2020-04-02 03:51:38 UTC |
@Jason-M-Chan Thank you for taking on this! My suggestion is to have smaller PRs, that way it will be easier to debug if necessary, and to avoid future merge conflicts. |
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 - looks pretty good!
pandas/tests/frame/test_apply.py
Outdated
@@ -1365,7 +1363,7 @@ def test_agg_cython_table(self, df, func, expected, axis): | |||
"df, func, expected", | |||
chain( | |||
tm.get_cython_table_params( | |||
DataFrame(), [("cumprod", DataFrame()), ("cumsum", DataFrame())] | |||
empty_frame, [("cumprod", empty_frame), ("cumsum", empty_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.
Need to add the fixture to the function signature here
I made the changes recommended above, but the Azure Pipeline still gives errors saying
I'm not sure how to debug this. Also, sorry about the large pull request, I will make smaller ones. |
pandas/tests/indexing/common.py
Outdated
@@ -89,7 +89,7 @@ def setup_method(self, method): | |||
self.series_ts_rev = Series(np.random.randn(4), index=dates_rev) | |||
self.frame_ts_rev = DataFrame(np.random.randn(4, 4), index=dates_rev) | |||
|
|||
self.frame_empty = DataFrame() | |||
self.frame_empty = empty_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.
I think you need to pass empty_frame
as a parameter to setup_method
here; I think would fix the CI issue you are asking about
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.
It looks like the common.py file can't actually access fixtures. I reverted back to DataFrame() instead.
-1 on this. there are good use cases for fixtures, this is not one of them. |
@jbrockmendel can you clarify your objection? I think this helps make what we consider an |
|
closing as stale. @WillAyd feel free to reopen if you want to pursue this. |
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff