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.
In two functions - check_lockedfiles and TestStatus.init - there was
a directory argument whose default was given by os.getcwd(). However, my
understanding of python's default arguments is that these defaults were
evaluated at the time the function was loaded, not at the time the
function was called.
This PR changes the behavior so that os.getcwd is evaluated at the time
the functions are called, if the respective arguments are not provided.
Without this change, I was getting failures in a few tests in
scripts_regression_tests on yellowstone, with messages like this:
The changes here seem to resolve that problem. It's not clear to me why
I sometimes ran into that problem and sometimes didn't, but this change
seems more "right" to me anyway, since it seems problematic to resolve
the current directory at the time the function happens to be loaded.
From a quick look, it looks like this change could, in principle, change
behavior for case_setup, which does:
before calling:
I cannot find any instances of TestStatus.init being called without
an explicit test_dir argument, so it doesn't look like that behavior
would be affected by this change.
Test suite: scripts_regression_tests on yellowstone
Test baseline:
Test namelist changes:
Test status: bit for bit
All passed except for the same 4 failures that I got in testing master:
Fixes none
User interface changes?: none
Code review: none yet