Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Safer rundir cleaning up in test suite #220

Open
nbren12 opened this issue Sep 11, 2021 · 2 comments
Open

Safer rundir cleaning up in test suite #220

nbren12 opened this issue Sep 11, 2021 · 2 comments

Comments

@nbren12
Copy link
Contributor

nbren12 commented Sep 11, 2021

The test suite manually cleans up the run directory code: https://github.com/VulcanClimateModeling/fv3gfs-fortran/blob/201f4cc6da6a90a477e59d04f58f05f503317e6c/tests/pytest/test_regression.py#L96

This is a bit concerning, since it could be easy to make a change to get_run_dir that e.g. returns /, which could result in disaster.

pytest offers two fixtures (tmpdir and tmpdir_factory) for creating temporary directories that are automatically cleaned up. Was there an intentional decision not to use these in favor of the more explicit but dangerous current approach?

@nbren12
Copy link
Contributor Author

nbren12 commented Sep 11, 2021

I noticed this when reviewing #212

@nbren12
Copy link
Contributor Author

nbren12 commented Sep 11, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant