Skip to content

Commit 8423719

Browse files
committed
Add python find test case
1 parent 295203d commit 8423719

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

crates/uv/tests/it/python_install.rs

+40
Original file line numberDiff line numberDiff line change
@@ -1231,4 +1231,44 @@ fn python_install_314() {
12311231
Installed Python 3.14.0a4 in [TIME]
12321232
+ cpython-3.14.0a4-[PLATFORM]
12331233
");
1234+
1235+
// We should be able to find this version without opt-in, because there is no stable release
1236+
// installed
1237+
uv_snapshot!(context.filters(), context.python_find().arg("3.14"), @r"
1238+
success: true
1239+
exit_code: 0
1240+
----- stdout -----
1241+
[TEMP_DIR]/managed/cpython-3.14.0a5-[PLATFORM]/bin/python3.14
1242+
1243+
----- stderr -----
1244+
");
1245+
1246+
uv_snapshot!(context.filters(), context.python_find().arg("3"), @r"
1247+
success: true
1248+
exit_code: 0
1249+
----- stdout -----
1250+
[TEMP_DIR]/managed/cpython-3.14.0a5-[PLATFORM]/bin/python3.14
1251+
1252+
----- stderr -----
1253+
");
1254+
1255+
// If we install a stable version, that should be preferred though
1256+
uv_snapshot!(context.filters(), context.python_install().arg("3.13"), @r"
1257+
success: true
1258+
exit_code: 0
1259+
----- stdout -----
1260+
1261+
----- stderr -----
1262+
Installed Python 3.13.2 in [TIME]
1263+
+ cpython-3.13.2-[PLATFORM]
1264+
");
1265+
1266+
uv_snapshot!(context.filters(), context.python_find().arg("3"), @r"
1267+
success: true
1268+
exit_code: 0
1269+
----- stdout -----
1270+
[TEMP_DIR]/managed/cpython-3.13.2-[PLATFORM]/bin/python3.13
1271+
1272+
----- stderr -----
1273+
");
12341274
}

0 commit comments

Comments
 (0)