Use pytest fixtures for temporary paths to fix cwd dependency in fre make tests#793
Use pytest fixtures for temporary paths to fix cwd dependency in fre make tests#793ceblanton wants to merge 1 commit intoNOAA-GFDL:mainfrom
Conversation
|
using relative pathing is almost as bad as using the current working directory. try using |
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. |
…make tests. Make YAMLPATH absolute, replace getcwd with tmp_path, use session tmp for interdependent tests. Resolves issue NOAA-GFDL#738.
cac6746 to
dc37e57
Compare
fair enough
|
|
closing in favor of #808 |
Install a custom sys.excepthook in the fre() entry point that suppresses Python tracebacks at default and -v verbosity levels. At -vv (DEBUG), the full traceback is shown. At lower levels, only the exception type and message are printed, along with a hint to use 'fre -vv ...' for more detail. Closes #793 Agent-Logs-Url: https://github.com/NOAA-GFDL/fre-cli/sessions/d594a572-8566-467b-9a96-4b233d712582 Co-authored-by: ilaflott <6273252+ilaflott@users.noreply.github.com>
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.