Unify temporary directory allocation strategy in tests#729
Open
Unify temporary directory allocation strategy in tests#729
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #729 +/- ##
=======================================
Coverage 87.21% 87.21%
=======================================
Files 69 69
Lines 4106 4106
Branches 709 709
=======================================
Hits 3581 3581
Misses 414 414
Partials 111 111 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This package was previously using three different temporary directory allocation strategies: - Manual `TemporaryDirectory` management - pytest `tmpdir` fixture - pytest `tmp_path` fixture This commit changes all temporary directory allocation in tests to use the `tmp_path` fixture, and includes a compatibility definition of that fixture so that the tests will continue to work properly on RHEL 8.
d653659 to
b59bf65
Compare
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.
This package was previously using three different temporary directory allocation strategies:
TemporaryDirectorymanagementtmpdirfixturetmp_pathfixtureThis commit changes all temporary directory allocation in tests to use the
tmp_pathfixture, and includes a compatibility definition of that fixture so that the tests will continue to work properly on Enterprise Linux 8.I'm not expecting a thorough review of this change. Only test files were touched, and the pattern is largely the same in each. The goal here is to move the codebase to more modern testing patterns while maintaining compatibility with the platforms we support. Additionally, the vast majority of the line changes are removing indentation that's no longer necessary.