File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -725,10 +725,21 @@ mod tests {
725725
726726 let environments = reporter. environments . lock ( ) . unwrap ( ) ;
727727
728+ // Canonicalize the venv_dir for comparison (handles Windows 8.3 short paths)
729+ let venv_dir_canonical = fs:: canonicalize ( & venv_dir) . unwrap_or ( venv_dir. clone ( ) ) ;
730+
728731 // The venv should be discovered even when searching by kind
732+ // Use canonicalize to handle Windows short path names (e.g., RUNNER~1 vs runneradmin)
729733 let venv_found = environments. iter ( ) . any ( |env| {
730734 env. kind == Some ( PythonEnvironmentKind :: Venv )
731- && env. prefix . as_ref ( ) . map ( |p| p == & venv_dir) . unwrap_or ( false )
735+ && env
736+ . prefix
737+ . as_ref ( )
738+ . map ( |p| {
739+ let p_canonical = fs:: canonicalize ( p) . unwrap_or ( p. clone ( ) ) ;
740+ p_canonical == venv_dir_canonical
741+ } )
742+ . unwrap_or ( false )
732743 } ) ;
733744
734745 assert ! (
You can’t perform that action at this time.
0 commit comments