@@ -75,8 +75,10 @@ fn verify_validity_of_discovered_envs() {
7575 let environment = EnvironmentApi :: new ( ) ;
7676 let conda_locator = Arc :: new ( Conda :: from ( & environment) ) ;
7777 let poetry_locator = Arc :: new ( Poetry :: from ( & environment) ) ;
78- let mut config = Configuration :: default ( ) ;
79- config. workspace_directories = Some ( vec ! [ workspace_dir. clone( ) ] ) ;
78+ let config = Configuration {
79+ workspace_directories : Some ( vec ! [ workspace_dir. clone( ) ] ) ,
80+ ..Default :: default ( )
81+ } ;
8082 let locators = create_locators ( conda_locator. clone ( ) , poetry_locator. clone ( ) , & environment) ;
8183 for locator in locators. iter ( ) {
8284 locator. configure ( & config) ;
@@ -288,12 +290,9 @@ fn verify_validity_of_interpreter_info(environment: PythonEnvironment) {
288290 && interpreter_info. clone ( ) . sys_prefix == "/usr/local/python/3.10.13" )
289291 || ( prefix. to_str ( ) . unwrap ( ) == "/usr/local/python/3.10.13"
290292 && interpreter_info. clone ( ) . sys_prefix == "/usr/local/python/current" )
291- {
292- // known issue https://github.com/microsoft/python-environment-tools/issues/64
293- } else if interpreter_info. clone ( ) . executable
294- == "/home/codespace/.python/current/bin/python"
295- && ( prefix. to_str ( ) . unwrap ( ) == "/home/codespace/.python/current"
296- && interpreter_info. clone ( ) . sys_prefix == "/usr/local/python/3.10.13" )
293+ || interpreter_info. clone ( ) . executable == "/home/codespace/.python/current/bin/python"
294+ && ( prefix. to_str ( ) . unwrap ( ) == "/home/codespace/.python/current"
295+ && interpreter_info. clone ( ) . sys_prefix == "/usr/local/python/3.10.13" )
297296 || ( prefix. to_str ( ) . unwrap ( ) == "/usr/local/python/3.10.13"
298297 && interpreter_info. clone ( ) . sys_prefix == "/home/codespace/.python/current" )
299298 {
@@ -492,13 +491,10 @@ fn compare_environments(actual: PythonEnvironment, expected: PythonEnvironment,
492491 && actual. clone ( ) . prefix == Some ( PathBuf :: from ( "/usr/local/python/3.10.13" ) ) )
493492 || ( prefix. to_str ( ) . unwrap ( ) == "/usr/local/python/3.10.13"
494493 && actual. clone ( ) . prefix == Some ( PathBuf :: from ( "/usr/local/python/current" ) ) )
495- {
496- // known issue https://github.com/microsoft/python-environment-tools/issues/64
497- actual. prefix = expected. clone ( ) . prefix ;
498- } else if actual. clone ( ) . executable
499- == Some ( PathBuf :: from ( "/home/codespace/.python/current/bin/python" ) )
500- && ( prefix. to_str ( ) . unwrap ( ) == "/home/codespace/.python/current"
501- && actual. clone ( ) . prefix == Some ( PathBuf :: from ( "/usr/local/python/3.10.13" ) ) )
494+ || actual. clone ( ) . executable
495+ == Some ( PathBuf :: from ( "/home/codespace/.python/current/bin/python" ) )
496+ && ( prefix. to_str ( ) . unwrap ( ) == "/home/codespace/.python/current"
497+ && actual. clone ( ) . prefix == Some ( PathBuf :: from ( "/usr/local/python/3.10.13" ) ) )
502498 || ( prefix. to_str ( ) . unwrap ( ) == "/usr/local/python/3.10.13"
503499 && actual. clone ( ) . prefix == Some ( PathBuf :: from ( "/home/codespace/.python/current" ) ) )
504500 {
@@ -591,8 +587,10 @@ fn verify_we_can_get_same_env_info_using_resolve_with_exe(
591587 let os_environment = EnvironmentApi :: new ( ) ;
592588 let conda_locator = Arc :: new ( Conda :: from ( & os_environment) ) ;
593589 let poetry_locator = Arc :: new ( Poetry :: from ( & os_environment) ) ;
594- let mut config = Configuration :: default ( ) ;
595- config. workspace_directories = Some ( vec ! [ workspace_dir. clone( ) ] ) ;
590+ let config = Configuration {
591+ workspace_directories : Some ( vec ! [ workspace_dir. clone( ) ] ) ,
592+ ..Default :: default ( )
593+ } ;
596594 let locators = create_locators (
597595 conda_locator. clone ( ) ,
598596 poetry_locator. clone ( ) ,
@@ -720,13 +718,13 @@ fn get_python_run_command(env: &PythonEnvironment) -> Vec<String> {
720718 "python" . to_string( ) ,
721719 ]
722720 } else if let Some ( prefix) = env. prefix . clone ( ) {
723- return vec ! [
721+ vec ! [
724722 conda_exe,
725723 "run" . to_string( ) ,
726724 "-p" . to_string( ) ,
727725 prefix. to_str( ) . unwrap_or_default( ) . to_string( ) ,
728726 "python" . to_string( ) ,
729- ] ;
727+ ]
730728 } else {
731729 panic ! ( "Conda environment without name or prefix" )
732730 }
@@ -741,8 +739,8 @@ fn get_python_run_command(env: &PythonEnvironment) -> Vec<String> {
741739 }
742740}
743741
744- fn get_python_interpreter_info ( cli : & Vec < String > ) -> InterpreterInfo {
745- let mut cli = cli. clone ( ) ;
742+ fn get_python_interpreter_info ( cli : & [ String ] ) -> InterpreterInfo {
743+ let mut cli = cli. to_owned ( ) ;
746744 cli. push (
747745 resolve_test_path ( & [ "interpreterInfo.py" ] )
748746 . to_str ( )
0 commit comments