test framework: method to get cache modes without given trait

Signed-off-by: Rutkowski, Adam J <adam.j.rutkowski@intel.com>
This commit is contained in:
Rutkowski, Adam J 2022-09-26 11:07:27 +02:00
parent 2da9753a10
commit d6eebc2cc3

View File

@ -60,6 +60,12 @@ class CacheMode(Enum):
m for m in CacheMode if all(map(lambda t: t in CacheMode.get_traits(m), flags))
]
@staticmethod
def without_traits(flags: CacheModeTrait):
return [
m for m in CacheMode if not any(map(lambda t: t in CacheMode.get_traits(m), flags))
]
@staticmethod
def with_any_trait(flags: CacheModeTrait):
return [