From 9af219ca9ed3722d662bf4795af15e6a03914036 Mon Sep 17 00:00:00 2001 From: Jameer Pathan <21165044+jameerpathan111@users.noreply.github.com> Date: Wed, 10 Apr 2024 17:11:02 +0200 Subject: [PATCH] Address jira issue handler pr comments --- pytest_plugins/metadata_markers.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pytest_plugins/metadata_markers.py b/pytest_plugins/metadata_markers.py index bcadb671ae5..cfa02fb8a89 100644 --- a/pytest_plugins/metadata_markers.py +++ b/pytest_plugins/metadata_markers.py @@ -234,7 +234,7 @@ def pytest_collection_modifyitems(items, config): item.user_properties.append(("SnapVersion", snap_version)) # exit early if no filters were passed - if importance or component or team or verifies_issues or blocked_by: + if importance or component or team: # Filter test collection based on CLI options for filtering # filters should be applied together # such that --component Repository --importance Critical --team rocket @@ -267,6 +267,7 @@ def pytest_collection_modifyitems(items, config): deselected.append(item) continue + if verifies_issues or blocked_by: # Filter tests based on --verifies-issues and --blocked-by pytest options # and Verifies and BlockedBy testimony tokens. verifies_marker = item.get_closest_marker('verifies_issues', False) @@ -275,8 +276,7 @@ def pytest_collection_modifyitems(items, config): continue if not handle_blocked_by(item, blocked_by_marker, blocked_by): continue - - selected.append(item) + selected.append(item) # selected will be empty if no filter option was passed, defaulting to full items list items[:] = selected if deselected else items