From 022a8f1dd11cf4e84c8c871b6e3ce325bcedcc25 Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Mon, 22 Sep 2025 09:26:13 -0500 Subject: [PATCH] Add test coverage for `python_upgrade` with a pre-release version (#15982) Coverage for https://github.com/astral-sh/uv/pull/15959 --- crates/uv/tests/it/python_upgrade.rs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/crates/uv/tests/it/python_upgrade.rs b/crates/uv/tests/it/python_upgrade.rs index 860b3395c..ca5c76f63 100644 --- a/crates/uv/tests/it/python_upgrade.rs +++ b/crates/uv/tests/it/python_upgrade.rs @@ -63,6 +63,29 @@ fn python_upgrade() { Installed Python 3.10.18 in [TIME] ~ cpython-3.10.18-[PLATFORM] (python3.10) "); + + // Install an earlier pre-release version + uv_snapshot!(context.filters(), context.python_install().arg("3.14.0rc2"), @r" + success: true + exit_code: 0 + ----- stdout ----- + + ----- stderr ----- + Installed Python 3.14.0rc2 in [TIME] + + cpython-3.14.0rc2-[PLATFORM] (python3.14) + "); + + // Upgrade the pre-release version + uv_snapshot!(context.filters(), context.python_upgrade(), @r" + success: true + exit_code: 0 + ----- stdout ----- + + ----- stderr ----- + warning: `uv python upgrade` is experimental and may change without warning. Pass `--preview-features python-upgrade` to disable this warning + Installed Python 3.14.0rc3 in [TIME] + + cpython-3.14.0rc3-[PLATFORM] + "); } #[test]