test: use pytest's tmp_path_factory fixture instead of tempfile#1535
Merged
akinomyoga merged 2 commits intoscop:mainfrom Dec 31, 2025
Merged
test: use pytest's tmp_path_factory fixture instead of tempfile#1535akinomyoga merged 2 commits intoscop:mainfrom
akinomyoga merged 2 commits intoscop:mainfrom
Conversation
Currently, the fixture directory is created for every test because the scope of the fixture is not specified. Since the contents of the fixture directory is fixed and each test does not modify its contents, it should be safe to share the fixture directory. In this patch, we specify the scope of the fixture to be "class", so that the fixture directory is shared by tests.
yedayak
reviewed
Dec 31, 2025
Comment on lines
+44
to
+45
| cmd1.symlink_to("../prefix1/bin/cmd1") | ||
| cmd2.symlink_to("../prefix1/sbin/cmd2") |
yedayak
approved these changes
Dec 31, 2025
Collaborator
Author
|
Thank you! |
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.
From #1531 (comment) by @yedayak:
I also include a change in the scope of a fixture
TestCompLoad.fixture_dir(test/t/unit/test_unit_load.py) in the second commit.