Repository navigation
test: replace deprecated CliRunner.isolated_filesystem with tmp_path (#916) - #917
Open
devpryan7792 wants to merge 1 commit into
Open
devpryan7792 wants to merge 1 commit into
devpryan7792 wants to merge 1 commit into
Conversation
Muguett-DBY
approved these changes
Oct 29, 2026
Muguett-DBY
left a comment
There was a problem hiding this comment.
I checked this on Windows with Python 3.12, Click 8.5 and DeprecationWarning treated as an error. In the two changed test files, the base had 32 failures from isolated_filesystem(); this commit has 218 passing and 4 skipped.
I also compared the 22 changed test functions after accounting for the fixture and context-manager replacement. Their remaining test bodies and assertions match the base. I used Codex for the comparison; this was a focused check of the two files, not a full-suite or non-Windows run.
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.
Click deprecated
CliRunner.isolated_filesystem()with plans to remove it in Click 9.0 (DeprecationWarning: 'isolated_filesystem' is deprecated and will be removed in Click 9.0).This replaces the 22
with runner.isolated_filesystem():blocks intests/test_cli.pyandtests/test_insert_files.pywith pytest'stmp_pathfixture andmonkeypatch.chdir(tmp_path).blackand verified withflake8.Fixes #916
📚 Documentation preview 📚: https://sqlite-utils--917.org.readthedocs.build/en/917/