From 1b760af79d32b936f37e3a18afe99185abd8d089 Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Wed, 30 Oct 2024 22:34:37 -0500 Subject: [PATCH] Fix test context filtering of Python platform keys with elided patch versions (#8713) Cherry-picked from #8650 --- crates/uv/tests/it/common/mod.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/uv/tests/it/common/mod.rs b/crates/uv/tests/it/common/mod.rs index 166f0f600..4d06f790c 100644 --- a/crates/uv/tests/it/common/mod.rs +++ b/crates/uv/tests/it/common/mod.rs @@ -215,8 +215,9 @@ impl TestContext { /// Adds a filter that ignores platform information in a Python installation key. pub fn with_filtered_python_keys(mut self) -> Self { + // Filter platform keys self.filters.push(( - r"((?:cpython|pypy)-\d+\.\d+(:?\.\d+)?[a-z]?(:?\+[a-z]+)?)-.*".to_string(), + r"((?:cpython|pypy)-\d+\.\d+(?:\.(?:\[X\]|\d+))?[a-z]?(?:\+[a-z]+)?)-.*".to_string(), "$1-[PLATFORM]".to_string(), )); self