Skip to content

Add tests for virtualenvwrapper, pyenv-virtuaenv, conda and a fixes - #26

Merged
Don Jayamanne (DonJayamanne) merged 33 commits into
mainfrom
moreTestsVenv
Jun 7, 2024
Merged

Add tests for virtualenvwrapper, pyenv-virtuaenv, conda and a fixes#26
Don Jayamanne (DonJayamanne) merged 33 commits into
mainfrom
moreTestsVenv

Conversation

@DonJayamanne

@DonJayamanne Don Jayamanne (DonJayamanne) commented Jun 6, 2024

Copy link
Copy Markdown
Collaborator

A lot of fixes/tweeks as a result of the tests finding issues.

);
}
// Then read the .condarc in the conda install folder as well.
if let Some(mut conda_rc) = Condarc::from_path(conda_dir) {

Copy link
Copy Markdown
Collaborator Author

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> {

Copy link
Copy Markdown
Collaborator Author

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() {

Copy link
Copy Markdown
Collaborator Author

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!(

@DonJayamanne Don Jayamanne (DonJayamanne) Jun 6, 2024

Copy link
Copy Markdown
Collaborator Author

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

Copy link
Copy Markdown
Collaborator Author

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![

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unnecessary, duplicate code removed

@DonJayamanne Don Jayamanne (DonJayamanne) changed the title Create virtual env wrapper env Add tests for virtualenvwrapper, pyenv-virtuaenv, conda and a fixes Jun 7, 2024
@DonJayamanne
Don Jayamanne (DonJayamanne) deleted the moreTestsVenv branch June 7, 2024 01:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants