Skip to content
This repository has been archived by the owner on Apr 7, 2022. It is now read-only.

Commit

Permalink
Fix so that tier, requirement, and customer-scenario filters are applied
Browse files Browse the repository at this point in the history
independently.
  • Loading branch information
tpapaioa committed Mar 31, 2020
1 parent f6f0b52 commit 225c2df
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cfme/markers/marker_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ def pytest_collection_modifyitems(session, config, items):
# for each filter, check if its active and that the item has the marker
# Then check if the marker content matches the passed filter
# Discard items without the matching value
if not getattr(item.get_closest_marker('tier'), 'args', [False])[0] in (tiers or []):
if tiers and getattr(item.get_closest_marker('tier'), 'args', [False])[0] not in tiers:
discard_tier.append(item)
continue
if (not getattr(item.get_closest_marker('requirement'), 'args', [False])[0]
in (requirements or [])):
if requirements and getattr(item.get_closest_marker('requirement'), 'args',
[False])[0] not in requirements:
discard_requirement.append(item)
continue
if customer and item.get_closest_marker('customer_scenario') is None:
if customer and not item.get_closest_marker('customer_scenario'):
discard_customer.append(item)
continue
keep.append(item)
Expand Down

0 comments on commit 225c2df

Please sign in to comment.