@@ -373,7 +373,8 @@ mod tests {
373373 let conda_dir = Some ( std:: path:: PathBuf :: from ( "/some/other/conda" ) ) ;
374374
375375 let history = std:: fs:: read_to_string ( & history_file) . unwrap ( ) ;
376- let name = get_conda_env_name ( & env_path, & conda_dir, Some ( & history) ) ;
376+ let creation_line = get_conda_creation_line ( & history) ;
377+ let name = get_conda_env_name ( & env_path, & conda_dir, creation_line. as_deref ( ) ) ;
377378 assert ! (
378379 name. is_none( ) ,
379380 "Path-based external env should return None for name, got {:?}" ,
@@ -407,7 +408,8 @@ mod tests {
407408 let conda_dir = Some ( std:: path:: PathBuf :: from ( "/some/other/conda" ) ) ;
408409
409410 let history = std:: fs:: read_to_string ( & history_file) . unwrap ( ) ;
410- let name = get_conda_env_name ( & env_path, & conda_dir, Some ( & history) ) ;
411+ let creation_line = get_conda_creation_line ( & history) ;
412+ let name = get_conda_env_name ( & env_path, & conda_dir, creation_line. as_deref ( ) ) ;
411413 assert_eq ! (
412414 name,
413415 Some ( "myenv" . to_string( ) ) ,
@@ -487,7 +489,8 @@ mod tests {
487489 let conda_dir = Some ( std:: path:: PathBuf :: from ( "/some/other/conda" ) ) ;
488490
489491 let history = std:: fs:: read_to_string ( & history_file) . unwrap ( ) ;
490- let name = get_conda_env_name ( & env_path, & conda_dir, Some ( & history) ) ;
492+ let creation_line = get_conda_creation_line ( & history) ;
493+ let name = get_conda_env_name ( & env_path, & conda_dir, creation_line. as_deref ( ) ) ;
491494 assert ! (
492495 name. is_none( ) ,
493496 "External env with mismatched name should return None, got {:?}" ,
0 commit comments