@@ -1198,7 +1198,7 @@ mod tests {
11981198 "We should allow the active conda python"
11991199 ) ;
12001200
1201- let baseenv = context. tempdir . child ( "base " ) ;
1201+ let baseenv = context. tempdir . child ( "conda " ) ;
12021202 TestContext :: mock_conda_prefix ( & baseenv, "3.12.1" ) ?;
12031203
12041204 // But not if it's a base environment
@@ -1224,21 +1224,23 @@ mod tests {
12241224 ) ;
12251225
12261226 // Unless, system interpreters are included...
1227- let python = context. run_with_vars (
1228- & [
1229- ( "CONDA_PREFIX" , Some ( baseenv. as_os_str ( ) ) ) ,
1230- ( "CONDA_DEFAULT_ENV" , Some ( & OsString :: from ( "base" ) ) ) ,
1231- ] ,
1232- || {
1233- find_python_installation (
1234- & PythonRequest :: Default ,
1235- EnvironmentPreference :: OnlySystem ,
1236- PythonPreference :: OnlySystem ,
1237- & context. cache ,
1238- Preview :: default ( ) ,
1239- )
1240- } ,
1241- ) ??;
1227+ let python = context
1228+ . run_with_vars (
1229+ & [
1230+ ( "CONDA_PREFIX" , Some ( baseenv. as_os_str ( ) ) ) ,
1231+ ( "CONDA_DEFAULT_ENV" , Some ( & OsString :: from ( "base" ) ) ) ,
1232+ ] ,
1233+ || {
1234+ find_python_installation (
1235+ & PythonRequest :: Default ,
1236+ EnvironmentPreference :: OnlySystem ,
1237+ PythonPreference :: OnlySystem ,
1238+ & context. cache ,
1239+ Preview :: default ( ) ,
1240+ )
1241+ } ,
1242+ ) ?
1243+ . unwrap ( ) ;
12421244
12431245 assert_eq ! (
12441246 python. interpreter( ) . python_full_version( ) . to_string( ) ,
@@ -1247,21 +1249,23 @@ mod tests {
12471249 ) ;
12481250
12491251 // If the environment name doesn't match the default, we should not treat it as system
1250- let python = context. run_with_vars (
1251- & [
1252- ( "CONDA_PREFIX" , Some ( condaenv. as_os_str ( ) ) ) ,
1253- ( "CONDA_DEFAULT_ENV" , Some ( & OsString :: from ( "base" ) ) ) ,
1254- ] ,
1255- || {
1256- find_python_installation (
1257- & PythonRequest :: Default ,
1258- EnvironmentPreference :: OnlyVirtual ,
1259- PythonPreference :: OnlySystem ,
1260- & context. cache ,
1261- Preview :: default ( ) ,
1262- )
1263- } ,
1264- ) ??;
1252+ let python = context
1253+ . run_with_vars (
1254+ & [
1255+ ( "CONDA_PREFIX" , Some ( condaenv. as_os_str ( ) ) ) ,
1256+ ( "CONDA_DEFAULT_ENV" , Some ( & OsString :: from ( "condaenv" ) ) ) ,
1257+ ] ,
1258+ || {
1259+ find_python_installation (
1260+ & PythonRequest :: Default ,
1261+ EnvironmentPreference :: OnlyVirtual ,
1262+ PythonPreference :: OnlySystem ,
1263+ & context. cache ,
1264+ Preview :: default ( ) ,
1265+ )
1266+ } ,
1267+ ) ?
1268+ . unwrap ( ) ;
12651269
12661270 assert_eq ! (
12671271 python. interpreter( ) . python_full_version( ) . to_string( ) ,
0 commit comments