-
Notifications
You must be signed in to change notification settings - Fork 13
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
Added comprehensive test for determining the current project. #2945
Conversation
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.
While I think the test you've setup is great it makes more sense as an integration test. When we're setting env vars in the test because certain commands do it signals to me that the behavior should be covered by an integration test. Right now, if we were to inadvertently change the behavior of state shell
this unit test wouldn't fail, whereas if this was an integration test we would catch it.
// It considers projects in the following order: | ||
// 1. Environment variable (e.g. `state shell` sets one) | ||
// 2. Working directory (i.e. walk up directory tree looking for activestate.yaml) | ||
// 3. Fall back on default project |
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.
This is great to have.
5c5403a
to
97e9c61
Compare
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.
Looks good to me! Feel free to remove the unit test if you like.
I also upgraded the existing unit test for this.