From 8db8209eb12a7c65d1ee8d6b110e4bd196d19110 Mon Sep 17 00:00:00 2001 From: Tasos Papaioannou Date: Wed, 18 Feb 2026 10:47:01 -0500 Subject: [PATCH] Fixes for upstream-pr option --- pytest_plugins/upstream_pr.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pytest_plugins/upstream_pr.py b/pytest_plugins/upstream_pr.py index 289a0330897..084e4e34760 100644 --- a/pytest_plugins/upstream_pr.py +++ b/pytest_plugins/upstream_pr.py @@ -32,7 +32,7 @@ def match_file_to_rule(filename, rule): path_pattern = rule.path try: - return bool(re.search(path_pattern, filename)) + return bool(re.search(path_pattern, filename, flags=re.IGNORECASE)) except re.error as e: logger.error(f"Invalid regex pattern '{path_pattern}': {e}") return False @@ -192,7 +192,7 @@ def pytest_collection_modifyitems(session, items, config): if match_file_to_rule(filename, rule) } if matched_filenames: - components.add(rule.component) + components.add(rule.component.lower()) unprocessed_filenames.difference_update(matched_filenames) logger.debug( f"Rule '{rule.path}' matched {len(matched_filenames)} files, "