Skip to content

Commit

Permalink
Address jira issue handler pr comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jameerpathan111 committed Apr 10, 2024
1 parent e5edc1a commit 9af219c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pytest_plugins/metadata_markers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand All @@ -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
Expand Down

0 comments on commit 9af219c

Please sign in to comment.