Fix serial-mode regression in pickle cache file manipulation tests#357
Draft
Copilot wants to merge 2 commits intotesting-improvementsfrom
Draft
Fix serial-mode regression in pickle cache file manipulation tests#357Copilot wants to merge 2 commits intotesting-improvementsfrom
Copilot wants to merge 2 commits intotesting-improvementsfrom
Conversation
Co-authored-by: shaypal5 <917954+shaypal5@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix pre-commit CI errors in testing process
Fix serial-mode regression in pickle cache file manipulation tests
Feb 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
isolated_cache_directoryautouse fixture was patching_global_params.cache_dirfor all pickle/maxage tests, including serial runs. Tests liketest_bad_cache_fileandtest_delete_cache_fileuse module-level path constants computed at import time:When the fixture redirected the global cache dir to
tmp_path, decorated functions wrote cache files there while the hardcoded paths still pointed to~/.cachier/. File manipulation operations (truncate/delete) silently missed the cache files, causing the tests to always returnFalse.Changes
tests/conftest.py: Guardisolated_cache_directorywithworker_id != "master"so cache dir patching only activates during parallel (xdist) execution, leaving serial test runs undisturbed.✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.