Closed SeanBryan51 closed 1 year ago
Won't it give permission issues if we run the tests on a central installation of benchcab? Would it be better to create TMP_DIR
under $TMPDIR
instead of cwd
? And then maybe the path could be benchcab_tests
instead of tests/tmp
.
Good point, using $TMPDIR
is probably the right way to do it
Currently, we can only run
pytest
from the project root directory so thatTMP_DIR
is a valid path to the temporary test directory: https://github.com/CABLE-LSM/benchcab/blob/f7ba1f076f54750aade09686de48aefdaea44b45/tests/common.py#L3-L5 https://github.com/CABLE-LSM/benchcab/blob/f7ba1f076f54750aade09686de48aefdaea44b45/tests/test_task.py#L22-L27Instead of using the current working directory, we should use
__file__
to get the temporary test directory so thatpytest
runs correctly from any directory.