-
Notifications
You must be signed in to change notification settings - Fork 24
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
Refactor / replace os.path with pathlib in many places #985
Conversation
…s fixing that validator again. need to avoid passing through Path('.')
@@ -56,7 +57,8 @@ def test_location_stack(): | |||
|
|||
# Push registered location (we should move | |||
s.push_loc(0) | |||
assert s.stack == [None, start_dir], "Directory stack is incorrect." "Wanted [None, {}], got {}.".format( | |||
stack = s.stack | |||
assert stack == [None, Path(start_dir)], "Directory stack is incorrect." "Wanted [None, {}], got {}.".format( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't Path already applied? Is this passing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, it passes, but I dont think its needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of this infrastructure is from David, and I just adjusted it to use Paths.
push_loc()
doesn't assume a path, this part tests that self.stack.append(Path.cwd())
works properly.
When we register a location on line 35 we need to make sure we can return to the starting directory by making sure it's on the stack.
Will need to resolve comments/conflicts then I approve this. |
Should make workflow/ensemble/sim dirs easier to read and maintain.