-
-
Notifications
You must be signed in to change notification settings - Fork 18k
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
More Json parametrize #33148
More Json parametrize #33148
Conversation
@@ -521,6 +521,11 @@ def index_or_series_obj(request): | |||
# ---------------------------------------------------------------- | |||
# DataFrames | |||
# ---------------------------------------------------------------- | |||
@pytest.fixture | |||
def 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.
This is scattered across a few modules right now that I didn't touch here; can use further here or in a follow up
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.
followup is fine.
def test_frame_default_orient(self): | ||
assert self.frame.to_json() == self.frame.to_json(orient="columns") | ||
def test_frame_default_orient(self, float_frame): | ||
assert float_frame.to_json() == float_frame.to_json(orient="columns") |
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.
Note that float_frame
and self.frame
aren't 100% equivalent because the former has the columns labeled ABCD whereas the latter didn't provide labels. I don't think that distinction matters for these tests though
with tm.ensure_clean("test.json") as path: | ||
for df in [ | ||
self.frame, | ||
self.frame2, | ||
float_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.
Similar to above comment, self.frame and self.frame2 are actually different in that the former uses default column labels whereas the latter used ABCD; I didn't think that distinction was worth creating a separate fixture or object within this test
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.
sure, but this is a historical accident, having a smaller set of common fixtures is better
LGTM |
follow on to #31191 - still a few more passes to go