Fix test context filtering of Python platform keys with elided patch versions (#8713)

Cherry-picked from #8650
This commit is contained in:
Zanie Blue 2024-10-30 22:34:37 -05:00 committed by GitHub
parent 85f9a0d0ec
commit 1b760af79d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -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