Skip to content

Conversation

@Chiwendaiyue
Copy link
Contributor

This PR replaces the usage of ensure_clean_store with the pytest tmp_path fixture in pandas/tests/io/pytables/test_timezones.py, as part of the ongoing effort to migrate away from the ensure_clean utility function.
Changes Made

  • Replaced all instances of ensure_clean_store(setup_path) with tmp_path fixture
  • Used pd.HDFStore(path) with unique filenames for each test to avoid conflicts
  • Removed the import of ensure_clean_store from the file
  • All tests continue to pass with the new implementation

Technical Details

  • Created unique HDF5 filenames for each test using tmp_path / "test_name.h5"
  • Maintained all existing test logic and assertions
  • Follows the project's guidance for replacing ensure_clean with pytest fixtures

Testing

  • All 71 tests in test_timezones.py pass
  • 1 test skipped (unrelated to changes)
  • No regressions introduced

Related Issue
Addresses the migration from ensure_clean to temp_file/tmp_path #fixtures62435

cloudboat and others added 24 commits October 7, 2025 20:43
- Implement insert_level method for MultiIndex to insert new levels at specified positions - Add comprehensive test cases for the new functionality - Fix level names handling to match expected behavior Resolves: MultiIndex level insertion feature request
- Implement insert_level method for MultiIndex to insert new levels at specified positions - Add comprehensive test cases for the new functionality - Fix level names handling to match expected behavior Resolves: MultiIndex level insertion feature request
- Implement insert_level method for MultiIndex to insert new levels at specified positions - Add comprehensive test cases for the new functionality - Fix level names handling to match expected behavior Resolves: MultiIndex level insertion feature request
Co-authored-by: Álvaro Kothe <kothe65@gmail.com>
…ersions & REF: Remove unnecessary else branch in MultiIndex.insert_level & REF: Simplify names handling in MultiIndex.insert_level
@Chiwendaiyue Chiwendaiyue deleted the replace-ensure-clean-test-timezones branch October 23, 2025 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant