@@ -68,6 +68,23 @@ fn python_install() {
6868 Found existing installation for Python 3.13: cpython-3.13.0-[PLATFORM]
6969 "### ) ;
7070
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+
7188 // Uninstallation requires an argument
7289 uv_snapshot ! ( context. filters( ) , context. python_uninstall( ) , @r###"
7390 success: false
@@ -93,25 +110,6 @@ fn python_install() {
93110 Uninstalled Python 3.13.0 in [TIME]
94111 - cpython-3.13.0-[PLATFORM]
95112 "### ) ;
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 ( ) ) ;
115113}
116114
117115#[ test]
0 commit comments