From b1078fe5952d368b218191211df14cef63f9f323 Mon Sep 17 00:00:00 2001 From: Tomasz Kramkowski Date: Wed, 3 Dec 2025 12:48:37 +0000 Subject: [PATCH] Improve testsuite missing python version panic message (#16960) ## Summary When the test suite panics due to a missing python version, it now prints some helpful information to guide users to `cargo run python install` and `CONTRIBUTING.md` ~~~ ---- pip_sync::incompatible_build_constraint stdout ---- thread 'pip_sync::incompatible_build_constraint' (19737) panicked at crates/uv/tests/it/common/mod.rs:1793:17: Could not find Python 3.9 for test Try `cargo run python install` first, or refer to CONTRIBUTING.md ~~~ ## Test Plan Uninstalled python3.9 and ran tests which depended on it. --- crates/uv/tests/it/common/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/uv/tests/it/common/mod.rs b/crates/uv/tests/it/common/mod.rs index fcda2d205..e0ad3c6ef 100644 --- a/crates/uv/tests/it/common/mod.rs +++ b/crates/uv/tests/it/common/mod.rs @@ -1790,7 +1790,7 @@ pub fn python_installations_for_versions( ) { python.into_interpreter().sys_executable().to_owned() } else { - panic!("Could not find Python {python_version} for test"); + panic!("Could not find Python {python_version} for test\nTry `cargo run python install` first, or refer to CONTRIBUTING.md"); } }) .collect::>();