@@ -805,7 +805,17 @@ setup(
805805 . contains ( & "my-pkg" . parse ( ) . unwrap ( ) ) ;
806806
807807 assert ! ( has_pkg, "my-pkg is not in no-build-isolation list" ) ;
808- pixi. install ( ) . await . expect ( "cannot install project" ) ;
808+
809+ let tmp_dir = tempdir ( ) . unwrap ( ) ;
810+ let tmp_dir_path = tmp_dir. path ( ) ;
811+
812+ temp_env:: async_with_vars (
813+ [ ( "PIXI_CACHE_DIR" , Some ( tmp_dir_path. to_str ( ) . unwrap ( ) ) ) ] ,
814+ async {
815+ pixi. install ( ) . await . expect ( "cannot install project" ) ;
816+ } ,
817+ )
818+ . await ;
809819}
810820
811821#[ tokio:: test( flavor = "multi_thread" , worker_threads = 1 ) ]
@@ -917,9 +927,19 @@ setup(
917927 // 2. PyPI packages with build isolation (package-tdjager) - batch
918928 // 3. PyPI packages without build isolation (package-b) - one by one
919929 // The key test: package-b should be able to import package-tdjager during its build
920- pixi. install ( )
921- . await
922- . expect ( "cannot install project with no-build-isolation dependencies" ) ;
930+
931+ let tmp_dir = tempdir ( ) . unwrap ( ) ;
932+ let tmp_dir_path = tmp_dir. path ( ) ;
933+
934+ temp_env:: async_with_vars (
935+ [ ( "PIXI_CACHE_DIR" , Some ( tmp_dir_path. to_str ( ) . unwrap ( ) ) ) ] ,
936+ async {
937+ pixi. install ( )
938+ . await
939+ . expect ( "cannot install project with no-build-isolation dependencies" ) ;
940+ } ,
941+ )
942+ . await ;
923943}
924944
925945#[ tokio:: test( flavor = "multi_thread" , worker_threads = 1 ) ]
@@ -953,7 +973,17 @@ async fn test_setuptools_override_failure() {
953973 platform = Platform :: current( )
954974 ) ;
955975 let pixi = PixiControl :: from_manifest ( & manifest) . expect ( "cannot instantiate pixi project" ) ;
956- pixi. install ( ) . await . expect ( "cannot install project" ) ;
976+
977+ let tmp_dir = tempdir ( ) . unwrap ( ) ;
978+ let tmp_dir_path = tmp_dir. path ( ) ;
979+
980+ temp_env:: async_with_vars (
981+ [ ( "PIXI_CACHE_DIR" , Some ( tmp_dir_path. to_str ( ) . unwrap ( ) ) ) ] ,
982+ async {
983+ pixi. install ( ) . await . expect ( "cannot install project" ) ;
984+ } ,
985+ )
986+ . await ;
957987}
958988
959989#[ tokio:: test( flavor = "multi_thread" , worker_threads = 1 ) ]
0 commit comments