Use pytest fixtures for temporary paths to fix cwd dependency in fre make tests#793
Open
ceblanton wants to merge 2 commits intoNOAA-GFDL:mainfrom
Open
Use pytest fixtures for temporary paths to fix cwd dependency in fre make tests#793ceblanton wants to merge 2 commits intoNOAA-GFDL:mainfrom
ceblanton wants to merge 2 commits intoNOAA-GFDL:mainfrom
Conversation
…make tests. Make YAMLPATH absolute, replace getcwd with tmp_path, use session tmp for interdependent tests. Resolves issue NOAA-GFDL#738.
Member
|
using relative pathing is almost as bad as using the current working directory. try using |
Contributor
Author
I don't understand.. this PR uses relative path from the pytest file, not relative path of the user. I really think this pytest tmpdir fixture is the most recommended way to manage pytest work directories. |
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.
Make YAMLPATH absolute, replace getcwd with tmp_path, use session tmp for interdependent tests. Resolves issue #738.
Describe your changes
Asked copilot to fix #738 using pytest fixtures to ensure a temporary directory is always available.
Issue ticket number and link (if applicable)
#738
Checklist before requesting a review
Note: If you are a code maintainer updating the tag or releasing a new fre-cli version, please use the
release_procedure.mdtemplate. To quickly use this template, open a new pull request, choose your branch, and add?template=release_procedure.mdto the end of the url.