@@ -507,7 +507,7 @@ fn python_install_default() {
507
507
----- stdout -----
508
508
509
509
----- stderr -----
510
- The `--default` flag is only available in preview mode; add the `--preview` flag to use `--default.
510
+ The `--default` flag is only available in preview mode; add the `--preview` flag to use `--default
511
511
"### ) ;
512
512
513
513
// Install a specific version
@@ -594,14 +594,23 @@ fn python_install_default() {
594
594
595
595
// Install multiple versions, with the `--default` flag
596
596
uv_snapshot ! ( context. filters( ) , context. python_install( ) . arg( "--preview" ) . arg( "3.12" ) . arg( "3.13" ) . arg( "--default" ) , @r###"
597
+ success: false
598
+ exit_code: 2
599
+ ----- stdout -----
600
+
601
+ ----- stderr -----
602
+ error: The `--default` flag cannot be used with multiple targets
603
+ "### ) ;
604
+
605
+ // Install 3.12 as a new default
606
+ uv_snapshot ! ( context. filters( ) , context. python_install( ) . arg( "--preview" ) . arg( "3.12" ) . arg( "--default" ) , @r###"
597
607
success: true
598
608
exit_code: 0
599
609
----- stdout -----
600
610
601
611
----- stderr -----
602
- Installed 2 versions in [TIME]
612
+ Installed Python 3.12.7 in [TIME]
603
613
+ cpython-3.12.7-[PLATFORM] (python, python3, python3.12)
604
- + cpython-3.13.0-[PLATFORM] (python3.13)
605
614
"### ) ;
606
615
607
616
let bin_python_minor_12 = context
@@ -610,7 +619,6 @@ fn python_install_default() {
610
619
. child ( format ! ( "python3.12{}" , std:: env:: consts:: EXE_SUFFIX ) ) ;
611
620
612
621
// All the executables should exist
613
- bin_python_minor_13. assert ( predicate:: path:: exists ( ) ) ;
614
622
bin_python_minor_12. assert ( predicate:: path:: exists ( ) ) ;
615
623
bin_python_major. assert ( predicate:: path:: exists ( ) ) ;
616
624
bin_python_default. assert ( predicate:: path:: exists ( ) ) ;
@@ -625,14 +633,6 @@ fn python_install_default() {
625
633
) ;
626
634
} ) ;
627
635
628
- insta:: with_settings!( {
629
- filters => context. filters( ) ,
630
- } , {
631
- insta:: assert_snapshot!(
632
- read_link_path( & bin_python_minor_13) , @"[TEMP_DIR]/managed/cpython-3.13.0-[PLATFORM]/bin/python3.13"
633
- ) ;
634
- } ) ;
635
-
636
636
insta:: with_settings!( {
637
637
filters => context. filters( ) ,
638
638
} , {
@@ -657,14 +657,6 @@ fn python_install_default() {
657
657
) ;
658
658
} ) ;
659
659
660
- insta:: with_settings!( {
661
- filters => context. filters( ) ,
662
- } , {
663
- insta:: assert_snapshot!(
664
- read_link_path( & bin_python_minor_13) , @"[TEMP_DIR]/managed/cpython-3.13.0-[PLATFORM]/python"
665
- ) ;
666
- } ) ;
667
-
668
660
insta:: with_settings!( {
669
661
filters => context. filters( ) ,
670
662
} , {
@@ -690,7 +682,7 @@ fn python_install_default() {
690
682
691
683
----- stderr -----
692
684
Installed Python 3.13.0 in [TIME]
693
- + cpython-3.13.0-[PLATFORM] (python, python3)
685
+ + cpython-3.13.0-[PLATFORM] (python, python3, python3.13 )
694
686
"### ) ;
695
687
696
688
// All the executables should exist
0 commit comments