@@ -68,6 +68,23 @@ fn python_install() {
68
68
Found existing installation for Python 3.13: cpython-3.13.0-[PLATFORM]
69
69
"### ) ;
70
70
71
+ // You can opt-in to a reinstall
72
+ uv_snapshot ! ( context. filters( ) , context. python_install( ) . arg( "--reinstall" ) , @r###"
73
+ success: true
74
+ exit_code: 0
75
+ ----- stdout -----
76
+
77
+ ----- stderr -----
78
+ Searching for Python installations
79
+ Found: cpython-3.13.0-[PLATFORM]
80
+ Installed Python 3.13.0 in [TIME]
81
+ ~ cpython-3.13.0-[PLATFORM]
82
+ warning: `[TEMP_DIR]/bin` is not on your PATH. To use the installed Python executable, run `export PATH="[TEMP_DIR]/bin:$PATH"`.
83
+ "### ) ;
84
+
85
+ // The executable should still be present in the bin directory
86
+ bin_python. assert ( predicate:: path:: exists ( ) ) ;
87
+
71
88
// Uninstallation requires an argument
72
89
uv_snapshot ! ( context. filters( ) , context. python_uninstall( ) , @r###"
73
90
success: false
@@ -93,25 +110,6 @@ fn python_install() {
93
110
Uninstalled Python 3.13.0 in [TIME]
94
111
- cpython-3.13.0-[PLATFORM]
95
112
"### ) ;
96
-
97
- // The executable should still be present in the bin directory
98
- bin_python. assert ( predicate:: path:: exists ( ) ) ;
99
-
100
- // You can opt-in to a reinstall
101
- uv_snapshot ! ( context. filters( ) , context. python_install( ) . arg( "--reinstall" ) , @r###"
102
- success: true
103
- exit_code: 0
104
- ----- stdout -----
105
-
106
- ----- stderr -----
107
- Searching for Python installations
108
- Installed Python 3.13.0 in [TIME]
109
- + cpython-3.13.0-[PLATFORM]
110
- warning: `[TEMP_DIR]/bin` is not on your PATH. To use the installed Python executable, run `export PATH="[TEMP_DIR]/bin:$PATH"`.
111
- "### ) ;
112
-
113
- // The executable should still be present in the bin directory
114
- bin_python. assert ( predicate:: path:: exists ( ) ) ;
115
113
}
116
114
117
115
#[ test]
0 commit comments