Skip to content

TST: Remove unnecessary read_csv usage during testing #55643

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

Merged
merged 7 commits into from
Oct 30, 2023

Conversation

mroeschke
Copy link
Member

No description provided.

@mroeschke mroeschke added the Testing pandas testing functions or related to the test suite label Oct 23, 2023
@mroeschke mroeschke added this to the 2.2 milestone Oct 23, 2023
1.40649,
],
},
index=Index(pd.to_datetime(ts.split("\n")), name="date_time"),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this any different from just making ts a list to begin with?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. Made this into a list

def asof(self, datapath):
return self.read_data(datapath, "asof.csv")
def asof(self):
df = pd.DataFrame(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think since this is reused a few times in the module we should make it a fixture

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is already marked as a fixture (a few lines up)?

@mroeschke
Copy link
Member Author

Looks like tests are passing so going to merge. Can follow up if needed

@mroeschke mroeschke merged commit 0287cde into pandas-dev:main Oct 30, 2023
@mroeschke mroeschke deleted the tst/clean/simplify branch October 30, 2023 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants