Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

TST: Replace ensure_clean with temp_file in 3 files #62556

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
mroeschke merged 2 commits into pandas-dev:main from mikkas456:issue-62435
Oct 5, 2025

Conversation

Copy link
Contributor

@mikkas456 mikkas456 commented Oct 3, 2025
edited
Loading


withtm.ensure_clean("__nat_parse_.csv") aspath:
df.to_csv(path)
path=temp_file.parent/"__nat_parse_.csv"
Copy link
Member

@mroeschke mroeschke Oct 3, 2025

Choose a reason for hiding this comment

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

Just use temp_file directly (no need to create the __nat_parse_.csv

parser.read_csv(fname, usecols=["col1", "col2", "col3"])
# unlink fails on windows if file handles still point to it
os.unlink(fname)
fname=temp_file.parent/"test.csv"
Copy link
Member

@mroeschke mroeschke Oct 3, 2025

Choose a reason for hiding this comment

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

Just use the temp_file directly here too

@mroeschke mroeschke added the Testing pandas testing functions or related to the test suite label Oct 3, 2025
@mroeschke mroeschke added this to the 3.0 milestone Oct 5, 2025
@mroeschke mroeschke merged commit 7be1d10 into pandas-dev:main Oct 5, 2025
42 checks passed
Copy link
Member

Thanks @mikkas456

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@mroeschke mroeschke mroeschke approved these changes

Assignees
No one assigned
Labels
Testing pandas testing functions or related to the test suite
Projects
None yet
Milestone
3.0
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /