-
Notifications
You must be signed in to change notification settings - Fork 27
Add tests for virtualenvwrapper, pyenv-virtuaenv, conda and a fixes #26
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
Conversation
@@ -117,6 +117,10 @@ pub fn get_environments(conda_dir: &Path) -> Vec<PathBuf> { | |||
.collect(), | |||
); | |||
} | |||
// Then read the .condarc in the conda install folder as well. | |||
if let Some(mut conda_rc) = Condarc::from_path(conda_dir) { |
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.
Missed this earlier
} | ||
|
||
/// Find the conda binary on the system | ||
pub fn find_conda_binary(env_vars: &EnvVariables) -> Option<PathBuf> { |
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.
Not required (old code)
if let Some(filename) = &env.prefix { | ||
name = filename.to_str().map(|f| f.to_string()); | ||
if let Some(prefix) = &env.prefix { | ||
if let Some(filename) = prefix.file_name() { |
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.
Bug fix
.into_values() | ||
.collect::<Vec<_>>(); | ||
|
||
assert!( |
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.
more tests, and fixed issues found while adding this test
|
||
assert!( | ||
environments.iter().any( | ||
|env| env.category == PythonEnvironmentCategory::PyenvVirtualEnv |
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.
more tests, and fixed issues found while adding this test
let program_data = env_vars.programdata.clone().unwrap_or_default(); | ||
let all_user_profile = env_vars.allusersprofile.clone().unwrap_or_default(); | ||
let home_drive = env_vars.homedrive.clone().unwrap_or_default(); | ||
let mut known_paths = vec![ |
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.
unnecessary, duplicate code removed
A lot of fixes/tweeks as a result of the tests finding issues.