Skip to content

Conversation

@invain01
Copy link
Contributor

@invain01 invain01 commented Nov 4, 2025

Summary

This PR replace uses of the internal ensure_clean helper with standard temporary-directory semantics in test helpers to avoid leaving open file handles on Windows and to prepare tests for migration to pytest's temp_file fixture.

Files Changed

  • pandas/_testing/_io.py

Changes

  • Replaced usage of the contextmanager-based ensure_clean with tempfile.TemporaryDirectory() in helper functions used by tests.

@jbrockmendel
Copy link
Member

Just use the temp_file fixture, don't use an intermediate tempfile.TemporaryDirectory step.

Also if this is AI-generated, we discourage that.

@jbrockmendel jbrockmendel added the AI Slop Suspected of being AI-generated, which is not welcome. label Nov 4, 2025
@invain01 invain01 closed this Nov 4, 2025
@invain01 invain01 deleted the new branch November 4, 2025 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI Slop Suspected of being AI-generated, which is not welcome.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants