diff options
author | Lovett, Trevor <trevor.lovett@att.com> | 2019-10-16 16:34:17 -0500 |
---|---|---|
committer | Lovett, Trevor (tl2972) <tl2972@att.com> | 2019-10-16 16:38:40 -0500 |
commit | b3a5befeb0d5d9e348b1ba7b29f412b15544a0ec (patch) | |
tree | ee49d6eb0f093a9426b633fafa168e82850e30a9 | |
parent | 48d35093a120d5a8c02a28c4a72f4f7d69b664f4 (diff) |
[VVP] Allow any_of and all_of in categories decorator
Change-Id: I76ff9ebd7108d2ef19a3f167c5a253a3ce5f07f7
Issue-ID: VVP-331
Signed-off-by: Lovett, Trevor <trevor.lovett@att.com>
-rw-r--r-- | ice_validator/tests/conftest.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/ice_validator/tests/conftest.py b/ice_validator/tests/conftest.py index 2a1cc55..3ef7fe1 100644 --- a/ice_validator/tests/conftest.py +++ b/ice_validator/tests/conftest.py @@ -360,13 +360,9 @@ def pytest_collection_modifyitems(session, config, items): config.traceability_items = list(items) # save all items for traceability if not config.option.self_test: for item in items: + passed_categories = set(config.option.test_categories or []) all_of_categories = getattr(item.function, "all_categories", set()) any_of_categories = getattr(item.function, "any_categories", set()) - if any_of_categories and all_of_categories: - raise RuntimeError( - "categories can not use 'any_of' with other categories" - ) - passed_categories = set(config.option.test_categories or []) if all_of_categories and not all_of_categories.issubset(passed_categories): item.add_marker( pytest.mark.skip( @@ -375,7 +371,7 @@ def pytest_collection_modifyitems(session, config, items): ) ) ) - elif any_of_categories and not passed_categories.intersection( + if any_of_categories and not passed_categories.intersection( any_of_categories ): item.add_marker( |